Initialize OneUp object.
TileSprite (or Rect) to use for display. Rectangle created if not provided.
Speed (and x-axis direction by numeric sign) to move from initial point.
Time in seconds to fade out.
The opacity of the entity (from 0 to 1)
An array of child entities for recursive update/render.
Whether or not the entity is dead.
Position of the entity.
Scale of the entity.
Whether or not the entity is visible.
Whether or not there are any child entities.
Add and return a child object.
Object to add to the container.
Remove and return a child object.
Object to remove from the container.
Update the state of the OneUp.
Delta time since last update.
Timestamp in seconds.
An effect where the provided TileSprite or Rect (defaults to rectangle if not provided) is moved vertically from its starting position at the specified speed, and fades out over its duration.
Default behavior is moving up and fading out over 0.6 seconds.
Example
// Inside a 'gotPickup' or similar function const coin = new TileSprite(texture, 48, 48) coin.anims.add('spin', [5, 6, 7, 8].map(x => ({ x, y: 4 } as any)), .1) coin.anims.play('spin') const one = this.add<OneUp>(new OneUp(coin)) one.pos.copy(this.player.pos)