MeleeAttacks
Defined in: gameplay/MeleeAttack.ts:105
The swings currently in the air, one per attacker: ONE swing lands on a target once, and the next one may land again. Leaning on “the event only fires once” is a contract the first multi-frame hit window breaks, and breaks silently — double damage reads as a balance problem, not a bug.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MeleeAttacks():
MeleeAttacks
Returns
Section titled “Returns”MeleeAttacks
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
void
Defined in: gameplay/MeleeAttack.ts:141
Returns
Section titled “Returns”void
close()
Section titled “close()”close(
entity):void
Defined in: gameplay/MeleeAttack.ts:116
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”void
forget()
Section titled “forget()”forget(
entity):void
Defined in: gameplay/MeleeAttack.ts:137
Drop an attacker’s swing (wire to world.onDespawn).
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”void
live()
Section titled “live()”live(
entity): {hits:number;id:number; } |null
Defined in: gameplay/MeleeAttack.ts:120
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”{ hits: number; id: number; } | null
open()
Section titled “open()”open(
entity):number
Defined in: gameplay/MeleeAttack.ts:110
Begin a swing, ending whatever this attacker had in the air.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”number
record()
Section titled “record()”record(
entity,target):boolean
Defined in: gameplay/MeleeAttack.ts:129
Record target as hit by this attacker’s live swing. False when the swing
already reached it, which is the whole point.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
target
Section titled “target”number
Returns
Section titled “Returns”boolean