Constructor
new Cylinder(config)
- Source:
- Implements:
Constructs the cylinder
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
config |
ClubCrawler.Types.DestructibleConfig | The configuration object Properties
|
Extends
- Phaser.GameObjects.Image
Methods
die()
- Source:
Called internally if the result of, for example, takeDamage causes it to die
Can clean up any other objects it needs to, like ongoing events, when it dies
takeDamage(damage)
- Source:
Called by collision function. Can react to damage here.
Parameters:
Name | Type | Description |
---|---|---|
damage |
number | amount of damage taken |