Package com.deco2800.game.input
Class InputFactory
java.lang.Object
com.deco2800.game.input.InputFactory
- Direct Known Subclasses:
KeyboardInputFactory
,TouchInputFactory
InputFactory creates inputType-specific inputFactories which can handle various types of input.
Currently only keyboard input and touch is implemented, but InputFactory can be expanded to
include more, e.g. touch gestures.
Methods to get new input handlers should be defined here.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract InputComponent
Creates an input handler for the cameraabstract InputComponent
abstract InputComponent
Creates an input handler for the playerabstract InputComponent
Creates an input handler for the terminalabstract InputComponent
Creates an input handler for the workerstatic InputFactory
createFromInputType
(InputFactory.InputType inputType)
-
Constructor Details
-
InputFactory
public InputFactory()
-
-
Method Details
-
createFromInputType
- Parameters:
inputType
- the type of input ot be handled by the game- Returns:
- an InputFactory for the specified input type
-
createForPlayer
Creates an input handler for the player- Returns:
- Player input handler
-
createForFriendlyUnit
-
createForWorker
Creates an input handler for the worker- Returns:
- Worker input handler
-
createForTerminal
Creates an input handler for the terminal- Returns:
- Terminal input handler
-
createForCamera
Creates an input handler for the camera- Returns:
- Terminal input handler
-