I want a cyclops to run at you but I have no Idea where to start. I tried looking for a scenario and I found space chase. It's code is as follows:
but for me it says that it can't find type "player" Help?
private Player target;
public void faceTarget()
{ //This command makes the ship face an actor.
int xDiff = target.getX() - getX();
int yDiff = target.getY() - getY();
double angle = Math.toDegrees(Math.atan2(yDiff, xDiff));
setRotation((int)Math.round(angle));
}
