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 each child in the container.
Automatically removes any child object marked as dead.
Delta time since last update.
Timestamp in seconds.
Holds game objects updated and/or rendered in the game loop.
Basically, just an Entity with an
updateimplementation.Example
const pickups = new Container() // Assuming there is a 'Pickup' type in your game. mapData.pickupLocations.forEach(pos => { pickups.push(new Pickup(pos)) })