I want an actor( the enemy) to follow the Main Actor. I tried to code a method to do this but when i put the method in act() it says:"cannot find symbol - variable player". Why does it searches for a variable?
Please Help.
private void followPlayer(Actor player)
{
turnTowards(player.getX(), player.getY());
move(1);
setRotation(0);
}
public void act()
{
followPlayer(player);
}
