InterfaceComponent constructor
InterfaceComponent({})
Implementation
InterfaceComponent({
required this.id,
required Vector2 position,
required Vector2 size,
Future<Sprite>? spriteUnselected,
Future<Sprite>? spriteSelected,
this.selectable = false,
this.onTapComponent,
}) {
loader?.add(AssetToLoad(spriteUnselected, (value) {
this.spriteUnselected = value;
}));
loader?.add(AssetToLoad(spriteSelected, (value) {
this.spriteSelected = value;
}));
this.position = position;
this.size = size;
}