UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

40 lines 1.07 kB
/** * Wait for a certain amount of time, then succeed * @author Alex Goldring * @copyright Company Named Limited (c) 2025 */ export class DelayBehavior extends Behavior<any> { /** * * @param json * @return {DelayBehavior} */ static fromJSON(json: any): DelayBehavior; /** * * @param {number} seconds in seconds * @return {DelayBehavior} */ static from(seconds: number): DelayBehavior; constructor(); /** * Delay value in seconds, how long should we wait? * @type {number} */ value: number; /** * Time elapsed * Must be finite, modified during update and initialization * @type {number} */ elapsed: number; fromJSON({ value, elapsed }: { value: any; elapsed?: number; }): void; initialize(ctx: any): void; tick(timeDelta: any): BehaviorStatus.Running | BehaviorStatus.Succeeded; } import { Behavior } from "../Behavior.js"; import { BehaviorStatus } from "../BehaviorStatus.js"; //# sourceMappingURL=DelayBehavior.d.ts.map