JoystickDirectional constructor
JoystickDirectional({})
Implementation
JoystickDirectional({
Future<Sprite>? spriteBackgroundDirectional,
Future<Sprite>? spriteKnobDirectional,
this.isFixed = true,
this.margin = const EdgeInsets.all(100),
this.alignment = Alignment.bottomLeft,
this.size = 80,
this.color = Colors.blueGrey,
this.enableDiagonalInput = true,
}) {
_loader?.add(AssetToLoad(spriteBackgroundDirectional, (value) {
_backgroundSprite = value;
}));
_loader?.add(AssetToLoad(spriteKnobDirectional, (value) {
_knobSprite = value;
}));
_tileSize = size / 2;
}