Class EditorView
- java.lang.Object
-
- com.bombinggames.wurfelengine.core.GameView
-
- com.bombinggames.wurfelengine.mapeditor.EditorView
-
- All Implemented Interfaces:
com.badlogic.gdx.ai.msg.Telegraph,GameManager
public class EditorView extends GameView implements com.badlogic.gdx.ai.msg.Telegraph
-
-
Constructor Summary
Constructors Constructor Description EditorView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.badlogic.gdx.math.Vector2getCameraMoveVector()booleanhandleMessage(com.badlogic.gdx.ai.msg.Telegram msg)voidinit(Controller controller, GameView oldView)Loades some files and set up everything when the engine is running.voidonEnter()Override to specify what should happen when the mangager becomes active.voidrender()Main method which is called every time and renders everything.voidselectEntities(int x1, int y1, int x2, int y2)Select every entity in this area.protected voidsetCameraMoveVector(float x, float y)protected voidsetCameraSpeed(float speed)voidupdate(float dt)Updates every camera and everything else which must be updated.-
Methods inherited from class com.bombinggames.wurfelengine.core.GameView
addCamera, classInit, dispose, drawString, drawString, enter, exit, getCameras, getController, getEqualizationScale, getGameSpaceSpriteBatch, getLoadMenu, getProjectionSpaceSpriteBatch, getRenderStorage, getShader, getShapeRenderer, getStage, isInitalized, isUsingDefaultShader, loadShaders, preUpdate, resetProjectionMatrix, resize, screenToGame, screenToGameBasic, screenXtoView, screenYtoView, setRenderStorage, setShader, useDefaultShader, viewToScreenX, viewToScreenY
-
-
-
-
Method Detail
-
init
public void init(Controller controller, GameView oldView)
Description copied from class:GameViewLoades some files and set up everything when the engine is running. After this has been inactive useGameView.onEnter()
This method is a an implementation of the Setter Injection pattern.- Overrides:
initin classGameView- Parameters:
controller- The dependent data controller used for the view. Can be null but should not.oldView- The view used before. Can be null.- See Also:
GameView.onEnter()
-
onEnter
public void onEnter()
Description copied from interface:GameManagerOverride to specify what should happen when the mangager becomes active. Super call must not be implemented.- Specified by:
onEnterin interfaceGameManager- Overrides:
onEnterin classGameView
-
selectEntities
public void selectEntities(int x1, int y1, int x2, int y2)Select every entity in this area.- Parameters:
x1- view spacey1- view spacex2- view spacey2- view space
-
setCameraSpeed
protected void setCameraSpeed(float speed)
- Parameters:
speed-
-
setCameraMoveVector
protected void setCameraMoveVector(float x, float y)- Parameters:
x- in game spacey- in game space
-
getCameraMoveVector
protected com.badlogic.gdx.math.Vector2 getCameraMoveVector()
- Returns:
-
render
public void render()
Description copied from class:GameViewMain method which is called every time and renders everything. You must manually render the devtools e.g. in an extended render method.
-
update
public void update(float dt)
Description copied from class:GameViewUpdates every camera and everything else which must be updated.
-
handleMessage
public boolean handleMessage(com.badlogic.gdx.ai.msg.Telegram msg)
- Specified by:
handleMessagein interfacecom.badlogic.gdx.ai.msg.Telegraph
-
-