public void setGameState(GameState gameState) { if (this.gameState != null) this.gameState.onLeave(); this.gameState = gameState; if (this.gameState != null) this.gameState.onEnter(); } }
public void setGameState(GameState gameState) { if (this.gameState != null) this.gameState.onLeave(); this.gameState = gameState; if (this.gameState != null) this.gameState.onEnter(); } }