Class Map

  • All Implemented Interfaces:
    Tickable
    Direct Known Subclasses:
    DebugMap, TestBattleMap

    public abstract class Map
    extends java.lang.Object
    implements Tickable
    Collection of "sectors" that make up a map, which is like a level or world
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String id
      Identifier for the map
      MapSector sector
      The current sector
      java.util.ArrayList<MapSector> sectors
      Collection of the map's sectors
    • Constructor Summary

      Constructors 
      Constructor Description
      Map​(java.lang.String id)
      Creates a new map
    • Field Detail

      • id

        public java.lang.String id
        Identifier for the map
      • sectors

        public java.util.ArrayList<MapSector> sectors
        Collection of the map's sectors
      • sector

        public MapSector sector
        The current sector
    • Constructor Detail

      • Map

        public Map​(java.lang.String id)
        Creates a new map
        Parameters:
        id - Name or identifier for the map
    • Method Detail

      • render

        public abstract void render​(org.newdawn.slick.Graphics graphics)
        Renders the map's contents
        Parameters:
        graphics - The graphics to use
      • onPlayerEnter

        public abstract void onPlayerEnter()
        Called when the player enters the map
      • onPlayerLeave

        public abstract void onPlayerLeave()
        Called when the player leaves the map
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object