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 = Vector2(position.x, position.y);
this.size = size;
}