@Test public void testPlayerXPosition() { initialise(); Mount mount = new BatMount(); Player player = new Player(); world.debugReset(); world.addEntity(player); player.setPosition(20, 20); world.addEntity(mount); mount.setPosition(20, 20); world.gameLoop(1); PlayerMountActions.toggleMount(player); PlayerMountActions.positionPlayer(player); assertEquals((int) (mount.getX() + mount.getSaddleX()), (int) player.getX()); }
public float getSaddleX() { return saddleX; }
Mount extends BasicMovingEntity { public float getSaddleX() { return saddleX; } }
Mount extends BasicMovingEntity { public float getSaddleX() { return saddleX; } Mount(); }
Mount extends BasicMovingEntity { public float getSaddleX() { return saddleX; } Mount(); void registerRider(Player rider); Player getRider(); void removeRider(Player player); void fly(boolean left, boolean right, boolean up, boolean down); float getSaddleX(); float getSaddleY(); }
Mount extends BasicMovingEntity { public float getSaddleX() { return saddleX; } Mount(); void registerRider(Player rider); Player getRider(); void removeRider(Player player); void fly(boolean left, boolean right, boolean up, boolean down); float getSaddleX(); float getSaddleY();  }