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 coresponding gameplay classes.
|
Modifier and Type | Method and Description |
---|---|
void |
exit()
Should get called when you leave the editor.
|
Controller |
getGameplayController() |
GameView |
getGameplayView() |
java.util.ArrayList<AbstractEntity> |
getSelectedEntities()
filter map editor entities
|
Selection |
getSelectionEntity()
Get the entity laying under the cursor.
|
boolean |
hasMapSave() |
void |
init()
This method works like a constructor.
|
void |
onEnter()
Overriding method should contain what should happen when the manager becomes active.
|
java.util.ArrayList<AbstractEntity> |
select(int x1,
int y1,
int x2,
int y2)
Select every entity in this area.
|
void |
setReverseMap(boolean reverseMap) |
void |
switchToGame(boolean replay)
Leave editor
|
dispose, disposeClass, enter, getDevTools, getLightEngine, getMap, getSaveSlot, getSoundEngine, init, isInitalized, loadMap, newSaveSlot, setMap, staticUpdate, update, useSaveSlot
public MapEditorController()
public MapEditorController(GameView gameplayView, Controller gameplayController)
gameplayView
- the old gameplay classes. If null: the editor then chooses a basic view.gameplayController
- the old gameplay classes. If null: the editor then chooses a basic controller.public Controller getGameplayController()
public GameView getGameplayView()
public void init()
Controller
init
in class Controller
public void onEnter()
GameManager
onEnter
in interface GameManager
onEnter
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()
public java.util.ArrayList<AbstractEntity> select(int x1, int y1, int x2, int y2)
x1
- view spacey1
- view spacex2
- view spacey2
- view spacepublic java.util.ArrayList<AbstractEntity> getSelectedEntities()
public void exit()
GameManager
exit
in interface GameManager
exit
in class Controller
public boolean hasMapSave()