Keyboard constructor
Keyboard({
- dynamic id,
- KeyboardConfig? config,
- PlayerControllerListener? observer,
Class responsible to adds a keyboard controller in your game.
If pass oberver
this param, the joystick will controll this observer and not the Component passed in player
param.
Implementation
Keyboard({
super.id,
KeyboardConfig? config,
PlayerControllerListener? observer,
}) : keyboardConfig = config ?? KeyboardConfig() {
if (observer != null) {
addObserver(observer);
}
}