Class EditorView

  • All Implemented Interfaces:
    com.badlogic.gdx.ai.msg.Telegraph, GameManager


    public class EditorView
    extends GameView
    implements com.badlogic.gdx.ai.msg.Telegraph
    • Constructor Detail

      • EditorView

        public EditorView​()
    • 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 use GameView.onEnter()
        This method is a an implementation of the Setter Injection pattern.
        Overrides:
        init in class GameView
        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 interface GameManager
        Overrides:
        onEnter in class GameView
      • selectEntities

        public void selectEntities​(int x1,
                                   int y1,
                                   int x2,
                                   int y2)
        Select every entity in this area.
        Parameters:
        x1 - view space
        y1 - view space
        x2 - view space
        y2 - view space
      • setCameraSpeed

        protected void setCameraSpeed​(float speed)
        Parameters:
        speed -
      • setCameraMoveVector

        protected void setCameraMoveVector​(float x,
                                           float y)
        Parameters:
        x - in game space
        y - 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.
        Overrides:
        render in class GameView
      • update

        public void update​(float dt)
        Description copied from class: GameView
        Updates every camera and everything else which must be updated.
        Overrides:
        update in class GameView
        Parameters:
        dt - time since last update in ms.
      • handleMessage

        public boolean handleMessage​(com.badlogic.gdx.ai.msg.Telegram msg)
        Specified by:
        handleMessage in interface com.badlogic.gdx.ai.msg.Telegraph