Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/excaliburjs/Excalibur. 🎮 Your friendly TypeScript 2D game engine for the web 🗡️ excaliburjs.com
excalibur excaliburjs game-development game-engine game-framework gamedev games html5-canvas typescript
Something went wrong. Try again.
1234567891011121314151617181920212223242526import type { Action } from '../action';import { nextActionId } from '../action';
export class CallMethod implements Action { id = nextActionId(); private _method: () => any; private _hasBeenCalled: boolean = false; constructor(method: () => any) { this._method = method; }
public update(elapsed: number) { this._method(); this._hasBeenCalled = true; } public isComplete() { return this._hasBeenCalled; } public reset() { this._hasBeenCalled = false; } public stop() { this._hasBeenCalled = true; }}