@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
43 lines • 1.23 kB
TypeScript
/**
* Wait for a given entity event via {@link EntityComponentDataset#addEntityEventListener}
* No failure condition, will wait forever until the event is detected.
* @see SendEventBehavior
* @author Alex Goldring
* @copyright Company Named Limited (c) 2025
*/
export class WaitForEventBehavior extends EntityBehavior {
/**
*
* @param json
* @return {WaitForEventBehavior}
*/
static fromJSON(json: any): WaitForEventBehavior;
/**
* Event name
* @type {string}
*/
event: string;
/**
* Has the even occurred already?
* @type {boolean}
*/
detected: boolean;
/**
* Entity to listen event on
* If value is negative - will assume value of the entity to which the behavior is bound
* @type {number}
*/
target: number;
fromJSON({ event, target }: {
event: any;
target?: number;
}): void;
tick(timeDelta: any): BehaviorStatus.Running | BehaviorStatus.Succeeded;
#private;
}
export namespace WaitForEventBehavior {
let typeName: string;
}
import { EntityBehavior } from "./EntityBehavior.js";
import { BehaviorStatus } from "../BehaviorStatus.js";
//# sourceMappingURL=WaitForEventBehavior.d.ts.map