Class InputSystem

All Implemented Interfaces:
Disposable, KryoSerializable

public final class InputSystem extends GameSystem
  • Field Details

  • Constructor Details

    • InputSystem

      public InputSystem()
  • Method Details

    • affectsGameState

      public boolean affectsGameState()
      Specified by:
      affectsGameState in class GameSystem
    • profileUpdate

      public boolean profileUpdate()
      Description copied from class: GameSystem
      Should the update() method be rendered on the debug overlay
      Overrides:
      profileUpdate in class GameSystem
    • getSystemName

      public String getSystemName()
      Specified by:
      getSystemName in class GameSystem
    • setup

      public void setup()
      Description copied from class: GameSystem
      Performs the initial configuration of the system. At the moment of call, systemProvider already contains all objects of systems.
      Overrides:
      setup in class GameSystem
    • postSetup

      public void postSetup()
      Description copied from class: GameSystem
      Performs the final configuration of the system. At the moment of call, all systems are already loaded and setup(), all listeners are already added.
      Overrides:
      postSetup in class GameSystem
    • getInputMultiplexer

      public InputMultiplexerExtended getInputMultiplexer()
      Allows to get an input handling stack and to modify it according to your needs. Be aware - the stack will be re-configured by this system in some cases and your changes will be lost, unless you subscribe to InputMultiplexerConfigure event and re-configure the stack again.
      Returns:
      a single instance of input multiplexer responsible for any input during the game. Can be modified at any time.
    • disableInput

      public void disableInput()
    • enableOnlyStage

      public void enableOnlyStage()
    • enableAllInput

      public void enableAllInput()
    • setupInputMultiplexer

      public InputMultiplexerExtended setupInputMultiplexer(boolean stage, boolean camera, boolean mouseEvents)
      Prepare and enable default input multiplexer with ability to disable particular processors. If everything is enabled, processors will be configured in this order: 1. Stage (com.prineside.tdi2.scene2d.Stage) 2. Camera (cameraController.getInputProcessor()) 3. Mouse (MouseEventsInputProcessor) After that, an InputMultiplexerConfigure event will be triggered and this multiplexer will be set through Gdx.input.setInputProcessor()
    • getInputProcessor

      public InputProcessor getInputProcessor()
    • getCameraController

      public CameraController getCameraController()
    • dispose

      public void dispose()
      Description copied from interface: com.badlogic.gdx.utils.Disposable
      Releases all resources of this object.
      Specified by:
      dispose in interface Disposable
      Overrides:
      dispose in class GameSystem
    • draw

      public void draw(Batch batch, float deltaTime, float realDeltaTime)