Hello, i have some problems here
here the code first
public void act()
{
checkHit();
checkProjectile();
hitActor();
}
public void checkHit()
{
Actor projectile;
projectile = getOneObjectAtOffset(0, 0, Projectile1.class);
if(getWorld().getObjects(Minion1.class).isEmpty())
{
getWorld().removeObject(projectile);
}
}
what i want is, when the Projectile hit an actor, and actor gone and then the projectile who chasing the actor got removed too @_@
but thats not happening, instead theres error :
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
@_@ help
sorry for my english
