How to make it that nothing moves until the left,right,up or down key is pressed?


class Player extends Actor{ static boolean hasMoved = false; void act() { //input code here and if input has happened then set hasMoved to true hasMoved = true; //never set it back to false, until the player dies. } }
//every other act (not the player class) in the universe has this in it: void act() { if(!Player.hasMoved) { return; } // the rest of your act routine goes here }