is it possible to disable methods? not removing the actor, just disable some stuff, for example: if my enemy dies, he performs an animation, however he still fires and gets hit by bullets which causes problems.
public void act()
{
//do everything which should always happen even if it is dead, for example play animation
if (hp<0) //if the object is dead
{
return; //exit the method and don't execute anything below
}
//rest of act method which should only be executed when the object is alive
}