public class MapEditorController extends Controller
Constructor and Description |
---|
MapEditorController()
USe this constructor if there are no specific gameplay classes.
|
MapEditorController(View gameplayView,
Controller gameplayController)
Create an editor controller with coressponding gameplay classes.
|
Modifier and Type | Method and Description |
---|---|
void |
enter()
should be called when entered
|
void |
exit()
should get called when you leave the editor
|
int |
getCurrentLayer()
Get the value of currentLayer
|
AbstractEntity |
getFocusentity()
Get the entity laying under the cursor.
|
void |
init()
This method works like a constructor.
|
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, getDevTools, getLightengine, getLoadMenu, getMap, getMinimap, getPlayer, getTimespeed, init, isInitalized, loadMap, newMap, newMap, requestRecalc, setMap, setMinimap, setPlayer, setTimespeed, update
public MapEditorController()
public MapEditorController(View 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 enter()
Controller
enter
in interface Manager
enter
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 AbstractEntity getFocusentity()