Class MapManager


  • public class MapManager
    extends java.lang.Object
    This class manages all currently loaded maps and transfers hero between maps
    • Method Detail

      • setMap

        public void setMap​(Map map)
        Sets map as the one that is currently used, if that map is not present in map list, the map is added
        Parameters:
        map - is map to be set
      • getActualMap

        public Map getActualMap()
      • getMaps

        public java.util.LinkedList<Map> getMaps()
      • createMap

        public void createMap()
        Sets person on a new map based on SPAWN cell
      • setPersonByMoveToEvent

        private void setPersonByMoveToEvent()
        Sets person on a new map based on MOVETO or DOORTO cell
      • repaintCanvas

        public void repaintCanvas()
      • resizeCanvas

        public void resizeCanvas​(int[] size)
        Sets canvas size based on current map
        Parameters:
        size - is array of new sizes for canvas