public void onCollision(Entity obstacle) { manager.onCollision(obstacle); if (obstacle.getRole() == Roles.OBSTACLE.ordinal()) { Repelable b = (Repelable) obstacle; b.repel(this); } }
private void initStates() { manager = new StateManager(); manager.add(new NormalState()); manager.add(new StunnedState()); }
public void update(StateBasedGame game, int delta) { manager.update(game, delta); }
public void render(StateBasedGame game, Graphics g) { manager.render(game, g); }