Package com.screens

Class MiniGameInputHandler

  • All Implemented Interfaces:
    com.badlogic.gdx.InputProcessor

    public class MiniGameInputHandler
    extends java.lang.Object
    implements com.badlogic.gdx.InputProcessor
    Input handler for Minigame, when the player clicks down on the screen, a water image will appear and destroy an alien if there is one there. The water will then disappear when the user clicks up. The user cannot drag the hose to avoid cheating!
    • Constructor Summary

      Constructors 
      Constructor Description
      MiniGameInputHandler​(MinigameScreen minigameScreen)
      Constructor for minigame handler, which takes minigameScreen so that is can communicate events that happen in here
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean keyDown​(int keycode)  
      boolean keyTyped​(char character)  
      boolean keyUp​(int keycode)  
      boolean mouseMoved​(int screenX, int screenY)  
      boolean scrolled​(int amount)  
      boolean touchDown​(int screenX, int screenY, int pointer, int button)  
      boolean touchDragged​(int screenX, int screenY, int pointer)  
      boolean touchUp​(int screenX, int screenY, int pointer, int button)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MiniGameInputHandler

        public MiniGameInputHandler​(MinigameScreen minigameScreen)
        Constructor for minigame handler, which takes minigameScreen so that is can communicate events that happen in here
        Parameters:
        minigameScreen - MinigameScreen
    • Method Detail

      • keyDown

        public boolean keyDown​(int keycode)
        Specified by:
        keyDown in interface com.badlogic.gdx.InputProcessor
      • keyUp

        public boolean keyUp​(int keycode)
        Specified by:
        keyUp in interface com.badlogic.gdx.InputProcessor
      • keyTyped

        public boolean keyTyped​(char character)
        Specified by:
        keyTyped in interface com.badlogic.gdx.InputProcessor
      • touchDown

        public boolean touchDown​(int screenX,
                                 int screenY,
                                 int pointer,
                                 int button)
        Specified by:
        touchDown in interface com.badlogic.gdx.InputProcessor
      • touchUp

        public boolean touchUp​(int screenX,
                               int screenY,
                               int pointer,
                               int button)
        Specified by:
        touchUp in interface com.badlogic.gdx.InputProcessor
      • touchDragged

        public boolean touchDragged​(int screenX,
                                    int screenY,
                                    int pointer)
        Specified by:
        touchDragged in interface com.badlogic.gdx.InputProcessor
      • mouseMoved

        public boolean mouseMoved​(int screenX,
                                  int screenY)
        Specified by:
        mouseMoved in interface com.badlogic.gdx.InputProcessor
      • scrolled

        public boolean scrolled​(int amount)
        Specified by:
        scrolled in interface com.badlogic.gdx.InputProcessor