public class Controller extends java.lang.Object implements Manager
Constructor and Description |
---|
Controller() |
Modifier and Type | Method and Description |
---|---|
static void |
disposeClass() |
void |
enter()
should be called when entered
|
void |
exit()
should get called when you leave the editor
|
DevTools |
getDevTools() |
static LightEngine |
getLightengine() |
LoadMenu |
getLoadMenu()
Get a menu which can be used for loading maps.
|
static Map |
getMap()
Returns the currently loaded map.
|
Minimap |
getMinimap()
Returns the minimap.
|
AbstractCharacter |
getPlayer()
Returns the player.
|
float |
getTimespeed() |
void |
init()
This method works like a constructor.
|
void |
init(Generator generator)
This method works like a constructor.
|
boolean |
isInitalized() |
static void |
loadMap(java.lang.String name)
Tries loading a map.
|
static void |
newMap()
Creates a new Map using it's generator.
|
static void |
newMap(Generator generator)
Creates a new Map.
|
static void |
requestRecalc()
Informs the map that a recalc is requested.
|
static void |
setMap(Map map) |
void |
setMinimap(Minimap minimap)
Set the minimap and "builds it"
|
void |
setPlayer(AbstractCharacter player)
Sets a player
|
void |
setTimespeed(float timespeed) |
void |
update(float delta)
Main method which is called every refresh.
|
public void init()
public void init(Generator generator)
generator
- Set the map generator you want to use.public void update(float delta)
delta
- time since last callpublic static void requestRecalc()
public static void newMap()
public static void newMap(Generator generator)
generator
- using this generatorpublic static void loadMap(java.lang.String name)
name
- the name of the mappublic static Map getMap()
public static void setMap(Map map)
map
- public AbstractCharacter getPlayer()
public void setPlayer(AbstractCharacter player)
player
- public Minimap getMinimap()
public void setMinimap(Minimap minimap)
minimap
- public static LightEngine getLightengine()
public float getTimespeed()
public void setTimespeed(float timespeed)
timespeed
- public DevTools getDevTools()
public LoadMenu getLoadMenu()
public static void disposeClass()
public boolean isInitalized()
isInitalized
in interface Manager
public void exit()