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.
123456789101112131415161718192021222324252627282930313233import type { Entity } from '../../entity-component-system/entity';import type { Action } from '../action';import { nextActionId } from '../action';import { ActionsComponent } from '../actions-component';
export class Die implements Action { id = nextActionId(); private _entity: Entity; private _stopped = false;
constructor(entity: Entity) { this._entity = entity; }
public update(elapsed: number): void { this._entity.get(ActionsComponent).clearActions(); this._entity.kill(); this._stopped = true; }
public isComplete(): boolean { return this._stopped; }
public stop(): void { return; }
public reset(): void { return; }}