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.Vector2
getCameraMoveVector()
boolean
handleMessage(com.badlogic.gdx.ai.msg.Telegram msg)
void
init(Controller controller, GameView oldView)
Loades some files and set up everything when the engine is running.void
onEnter()
Override to specify what should happen when the mangager becomes active.void
render()
Main method which is called every time and renders everything.void
selectEntities(int x1, int y1, int x2, int y2)
Select every entity in this area.protected void
setCameraMoveVector(float x, float y)
protected void
setCameraSpeed(float speed)
void
update(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:GameView
Loades 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:
init
in 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:GameManager
Override to specify what should happen when the mangager becomes active. Super call must not be implemented.- Specified by:
onEnter
in interfaceGameManager
- Overrides:
onEnter
in 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:GameView
Main 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:GameView
Updates every camera and everything else which must be updated.
-
handleMessage
public boolean handleMessage(com.badlogic.gdx.ai.msg.Telegram msg)
- Specified by:
handleMessage
in interfacecom.badlogic.gdx.ai.msg.Telegraph
-
-