Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SpellData

Data backend for spells. This is different from Spell outside databackend, this is only for spells could cast by mob (& player). And this is the data "backend" for spells, they don't have any renderable and physics body. When used, they create a Spell in the game world, and reset cooldown time etc.

Hierarchy

Index

Constructors

constructor

Properties

available

available: boolean

castTime

castTime: number

channelTime

channelTime: number

coolDown

coolDown: number

coolDownRemain

coolDownRemain: number

globalCoolDown

globalCoolDown: number

isCast

isCast: boolean

isChannel

isChannel: boolean

manaCost

manaCost: number

name

name: string

priority

priority: number

Methods

cast

  • cast(mob: Mob, target: Mob | Vector2): void

forceCast

  • forceCast(mob: Mob, target: Mob | Vector2): void

getManaCost

  • getManaCost(mob: Mob): number

isAvailable

  • isAvailable(mob: Mob): boolean

onCast

  • onCast(mob: Mob, target: Mob | Vector2): void

onChanneling

  • onChanneling(mob: Mob, target: Mob | Vector2, dt: number): void

onUpdate

  • onUpdate(mob: Mob, dt: number): void

preCast

  • preCast(mob: Mob, target: Mob | Vector2): boolean

update

  • update(mob: Mob, dt: number): void

Generated using TypeDoc