Cylinder

ClubCrawler.Objects. Cylinder

A class for an Cylinder that moves around.

Constructor

new Cylinder(config)

Source:
Implements:

Constructs the cylinder

Parameters:
Name Type Description
config ClubCrawler.Types.DestructibleConfig

The configuration object

Properties
Name Type Description
scene Phaser.Scene

The creating scene

item Item

The Tiled item data having the x,y, and any default-overriding values

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