Package com.screens
Class MiniGameInputHandler
- java.lang.Object
-
- com.screens.MiniGameInputHandler
-
- All Implemented Interfaces:
com.badlogic.gdx.InputProcessor
public class MiniGameInputHandler extends java.lang.Object implements com.badlogic.gdx.InputProcessorInput 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 booleankeyDown(int keycode)booleankeyTyped(char character)booleankeyUp(int keycode)booleanmouseMoved(int screenX, int screenY)booleanscrolled(int amount)booleantouchDown(int screenX, int screenY, int pointer, int button)booleantouchDragged(int screenX, int screenY, int pointer)booleantouchUp(int screenX, int screenY, int pointer, int button)
-
-
-
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:
keyDownin interfacecom.badlogic.gdx.InputProcessor
-
keyUp
public boolean keyUp(int keycode)
- Specified by:
keyUpin interfacecom.badlogic.gdx.InputProcessor
-
keyTyped
public boolean keyTyped(char character)
- Specified by:
keyTypedin interfacecom.badlogic.gdx.InputProcessor
-
touchDown
public boolean touchDown(int screenX, int screenY, int pointer, int button)- Specified by:
touchDownin interfacecom.badlogic.gdx.InputProcessor
-
touchUp
public boolean touchUp(int screenX, int screenY, int pointer, int button)- Specified by:
touchUpin interfacecom.badlogic.gdx.InputProcessor
-
touchDragged
public boolean touchDragged(int screenX, int screenY, int pointer)- Specified by:
touchDraggedin interfacecom.badlogic.gdx.InputProcessor
-
mouseMoved
public boolean mouseMoved(int screenX, int screenY)- Specified by:
mouseMovedin interfacecom.badlogic.gdx.InputProcessor
-
scrolled
public boolean scrolled(int amount)
- Specified by:
scrolledin interfacecom.badlogic.gdx.InputProcessor
-
-