Constructor
new BubbleDamage(game, startX, startY, id, value)
Create a damage bubble.
Parameters:
Name | Type | Description |
---|---|---|
game |
SpaceInvaders | The current game. |
startX |
number | Starting X position. |
startY |
number | Starting Y position. |
id |
string | Unique HTML DOM id. |
value |
number | Value displayed in the bubble. |
- Source:
Extends
Methods
move() → {boolean}
Move the bubble up or down based on direction.
Collision detection on screen edges.
- Inherited From:
- Source:
Returns:
- Type
- boolean
update() → {boolean}
Update the bubble, call move and fade it out.
When faded out disable it. BubbleFactory will kill it
on the next update.
- Inherited From:
- Source:
Returns:
- Type
- boolean