12345678910111213141516171819202122232425 |
- package pathgame.tilemap;
- import pathgame.gameplay.Keys;
- import pathgame.gameplay.Player;
- /** Class for ports to have special behaviour.
- *
- * @author kajetan
- */
- public class TilePort extends Tile
- {
- public TilePort()
- {
- super(2, 0.0f, (pa) -> 0, false, false, TileType.PORT, false, false, TileRenderType.NORMAL);
- }
- @Override
- public void isStandingOn(Player p, TileMap map, int x, int y)
- {
- if(Keys.BOAT_KEY.getTime() == 1)
- {
- p.switchSailing();
- }
- }
- }
|