Class Map
- java.lang.Object
-
- net.egartley.beyondorigins.core.abstracts.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
-
-
Constructor Summary
Constructors Constructor Description Map(java.lang.String id)
Creates a new map
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
changeSector(MapSector to, MapSector from)
Moves from one sector to anotherabstract void
onPlayerEnter()
Called when the player enters the mapabstract void
onPlayerLeave()
Called when the player leaves the mapabstract void
onSectorChange(MapSectorChangeEvent event)
Called when the current sector changesabstract void
render(org.newdawn.slick.Graphics graphics)
Renders the map's contentsjava.lang.String
toString()
-
-
-
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
-
onSectorChange
public abstract void onSectorChange(MapSectorChangeEvent event)
Called when the current sector changes- See Also:
changeSector(MapSector, MapSector)
-
changeSector
public void changeSector(MapSector to, MapSector from)
Moves from one sector to another- Parameters:
to
- Where the player is goingfrom
- Where the player is coming from (null if initially entering the map)- See Also:
onSectorChange(MapSectorChangeEvent)
,MapSector.onPlayerEnter(MapSector)
,MapSector.onPlayerLeave(MapSector)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-