TilePort.java 451 B

123456789101112131415161718192021
  1. package pathgame.tilemap;
  2. import pathgame.gameplay.Keys;
  3. import pathgame.gameplay.Player;
  4. public class TilePort extends Tile
  5. {
  6. public TilePort()
  7. {
  8. super(2, 0.0f, (pa) -> 0, false, false, TileType.PORT, false, false, TileRenderType.NORMAL);
  9. }
  10. @Override
  11. public void isStandingOn(Player p, TileMap map, int x, int y)
  12. {
  13. if(Keys.BOAT_KEY.getTime() == 1)
  14. {
  15. p.switchSailing();
  16. }
  17. }
  18. }