Defines frame ranges where an animation state can be cancelled.
Usage:
const cancel = new CancelWindow();cancel.define('attack1', { start: 8, end: 15, into: ['attack2', 'dodge'] });cancel.define('attack1', { start: 4, end: 15, into: ['special'] }); // special can cancel earliercancel.canCancel('attack1', 'attack2', 10); // true (frame 10 is in [8, 15])cancel.canCancel('attack1', 'attack2', 3); // false (frame 3 is before window) Copy
const cancel = new CancelWindow();cancel.define('attack1', { start: 8, end: 15, into: ['attack2', 'dodge'] });cancel.define('attack1', { start: 4, end: 15, into: ['special'] }); // special can cancel earliercancel.canCancel('attack1', 'attack2', 10); // true (frame 10 is in [8, 15])cancel.canCancel('attack1', 'attack2', 3); // false (frame 3 is before window)
Last frame where cancelling is allowed
States that can be cancelled into during this window
First frame where cancelling is allowed
Defines frame ranges where an animation state can be cancelled.
Usage: