Skip to content

MageTowerModel

Specific model implementation for the Mage Tower.

MageTowerModel

Extends TowerModel.

Methods

constructor()

ts
function constructor(): void

Initializes the model by calling the super({ name: 'mage-tower' }).

update()

ts
function update(dt: number, user: any): void

Updates the model every frame. If user.firingTick is present, animates the tower head by scaling it based on the time since it fired. The animation lasts for 250ms with an amplitude of 0.4. Calls super.update(dt, user).