Joystick constructor
Joystick({
- dynamic id,
- List<
JoystickAction> actions = const [], - JoystickDirectional? directional,
- PlayerControllerListener? observer,
Class responsable to adds a joystick controller in your game.
If pass oberver
this param, the joystick will controll this observer and not the Component passed in player
param.
Implementation
Joystick({
super.id,
this.actions = const [],
JoystickDirectional? directional,
PlayerControllerListener? observer,
}) {
_directional = directional;
if (observer != null) {
addObserver(observer);
}
}