public class Controller extends java.lang.Object implements GameManager
Constructor and Description |
---|
Controller() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
should be called if removed from memory
|
static void |
disposeClass()
Disposes static stuff.
|
void |
enter()
Should be called when the manager becomes active.
|
void |
exit()
Should get called when you leave the editor.
|
DevTools |
getDevTools() |
static LightEngine |
getLightEngine()
The light engine doing the lighting.
|
static AbstractMap |
getMap()
Returns the currently loaded map.
|
int |
getSaveSlot()
get the savee slot used for loading and saving the map.
|
static SoundEngine |
getSoundEngine()
The sound engine managing the sfx.
|
void |
init()
This method works like a constructor.
|
void |
init(int saveslot)
This method works like a constructor.
|
boolean |
isInitalized() |
static boolean |
loadMap(java.io.File path,
int saveslot)
Tries loading a map.
|
int |
newSaveSlot()
Uses a new save slot as the save slot
|
void |
onEnter()
Overriding method should contain what should happen when the manager becomes active.
|
static void |
setMap(AbstractMap map) |
static void |
staticUpdate(float dt)
update every static update method
|
void |
update(float dt)
Main method which is called every refresh.
|
void |
useSaveSlot(int slot)
uses a specific save slot for loading and saving the map.
|
public static void staticUpdate(float dt)
dt
- public static boolean loadMap(java.io.File path, int saveslot)
path
- saveslot
- this saveslot will become the activepublic static AbstractMap getMap()
public static void setMap(AbstractMap map)
map
- public static LightEngine getLightEngine()
public static SoundEngine getSoundEngine()
public void useSaveSlot(int slot)
slot
- public int getSaveSlot()
public int newSaveSlot()
public void init()
public void init(int saveslot)
saveslot
- public void update(float dt)
dt
- time since last callpublic DevTools getDevTools()
public boolean isInitalized()
isInitalized
in interface GameManager
public void onEnter()
GameManager
onEnter
in interface GameManager
public final void enter()
GameManager
GameManager.onEnter()
.enter
in interface GameManager
GameManager.onEnter()
public void exit()
GameManager
exit
in interface GameManager
public void dispose()
GameManager
dispose
in interface GameManager
public static void disposeClass()