I want an actor to get the location of itself but I'm finding trouble understanding the getX/Y() commands. What I'm trying to do create an if statement where if the actor is in a specific location and the user presses enter, a new world gets loaded. So this is what I have so far:
1 2 3 4 5 | public void CheckEnter() { if (actor location x = value && actor location y = value && (Greenfoot.isKeyDown( "enter" ))) Greenfoot.setWorld( new BattleFightAttack()); } |