Methods
addSprite(sprite)
Add a sprite to this group.
Parameters:
Name | Type | Description |
---|---|---|
sprite |
Sprite | a sprite to add to this group |
drawSprites(context)
Draw the sprites in this group.
Parameters:
Name | Type | Description |
---|---|---|
context |
the graphics context object associated to the game canvas |
getSpriteCount() → {number}
Get the number of sprites in this group.
Returns:
the number of sprites in this group
- Type
- number
getSpriteList() → {List}
Get the list of sprites stored in this group.
Typically used in loops that involve all sprites in this group.
Typically used in loops that involve all sprites in this group.
Returns:
the list of sprites in this group
- Type
- List
removeSprite(sprite)
Remove a sprite from this group.
Parameters:
Name | Type | Description |
---|---|---|
sprite |
Sprite | a sprite to remove from this group |
updateSprites(deltaTime)
Update the sprites in this group.
Parameters:
Name | Type | Description |
---|---|---|
deltaTime |
the change in time since the last clock update |