I have an ActorA walking with guns and a Target called ActorB. I am missing with the missile
this is in ActorA in act
this in the missile
List<ActorB> turs= getObjectsInRange(range,ActorB.class);
if(turs.size()==0)
return;
Actor B tur = (ActorB)turs.get(0);
turnTowards(tur.getX(),tur.getY());
Actor missiles = new Missile();
missiles = new MissileA(getRotation());}
getWorld().addObject(missiles,getX(),getY());
public MissileA(int rot)
{
setRotation(rot);
}
public void act()
{
ActorB tur= (ActorB) getOneIntersectingObject(ActorB.class);
if(tur!=null)
{
tur.damage(power);
getWorld().removeObject(this);
return;
}
move(speed);
}


