public class MapEditorController extends Controller
Constructor and Description |
---|
MapEditorController()
USe this constructor if there are no specific gameplay classes.
|
MapEditorController(GameView gameplayView,
Controller gameplayController)
Create an editor controller with coressponding gameplay classes.
|
Modifier and Type | Method and Description |
---|---|
void |
exit()
should get called when you leave the editor
|
int |
getCurrentLayer()
Get the value of currentLayer
|
Selection |
getSelectionEntity()
Get the entity laying under the cursor.
|
void |
init()
This method works like a constructor.
|
void |
onEnter()
Overriding method should contain what should happen when the manager becomes active.
|
void |
setCurrentLayer(int currentLayer)
Set the value of currentLayer, the layer until every block gets filtered.
|
void |
setReverseMap(boolean reverseMap) |
void |
switchToGame(boolean replay)
Leave editor
|
disposeClass, enter, getDevTools, getLightEngine, getMap, getMinimap, getPlayer, getTimespeed, init, isInitalized, loadMap, requestRecalc, setMap, setMinimap, setPlayer, setTimespeed, update
public MapEditorController()
public MapEditorController(GameView gameplayView, Controller gameplayController)
gameplayView
- the old gameplay classes. If "null": the editor then chooses a basic controller.gameplayController
- the old gameplay classes. If "null": the editor then chooses a basic view.public void init()
Controller
init
in class Controller
public void onEnter()
GameManager
onEnter
in interface GameManager
onEnter
in class Controller
public int getCurrentLayer()
public void setCurrentLayer(int currentLayer)
currentLayer
- new value of currentLayerpublic void exit()
Controller
exit
in class Controller
public void setReverseMap(boolean reverseMap)
reverseMap
- public void switchToGame(boolean replay)
replay
- true when everything should be reloaded, else just a switch to last statuspublic Selection getSelectionEntity()