Trying to implement HP into invaders.
int invHP = world.getInvaders().getHP(); is a ref to int invaderHP = 0; in Invader. The problem is that getInvaders() is not found in the world class (Space) for some reason, even though it is in the class.
if (getRotation() == 270)
{
Actor invader = getOneIntersectingObject(Invader.class);
if (invader != null)
{
int invHP = world.getInvaders().getHP();
world.removeObject(invader);
world.removeObject(this);
}
else if (getY() == 0) world.removeObject(this);
}private Invader inv;
public Invader getInvaders()
{
return inv;
}