public void undoChangeBallType() { if (undoBallType != null && undo) { LevelScreen screen = levelScreenManager.getScreen(); BallShooter shooter = screen.getShooter(); shooter.changeBallType(undoBallType); undo = false; } }
public void changeBallType(Ball.BallType type) { if (gameManager.hasItem(type)) { LevelScreen screen = levelScreenManager.getScreen(); BallShooter shooter = screen.getShooter(); shooter.changeBallType(type); undo = true; } }