GameObject constructor
GameObject({})
Implementation
GameObject({
required Vector2 position,
required Vector2 size,
required FutureOr<Sprite>? sprite,
Vector2? positionFromTarget,
LightingConfig? lightingConfig,
this.objectPriority,
double angle = 0,
Anchor anchor = Anchor.topLeft,
bool renderAboveComponents = false,
}) {
this.renderAboveComponents = renderAboveComponents;
this.anchor = anchor;
this.position = position;
this.size = size;
this.angle = angle;
loader?.add(AssetToLoad(sprite, (value) => this.sprite = value));
setupLighting(lightingConfig);
}