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.
464 B · 18 lines
TypeScript
12345678910111213141516171819import { Component } from '../component';
export interface PauseComponentInterface { canPause: boolean;}
export const PauseComponentTag = 'ex.paused' as const;export class PauseComponent extends Component { // @ts-ignore private static _NAME = 'PauseComponent'; paused: boolean = false; canPause: boolean = true;
constructor(config: Partial<PauseComponentInterface> = {}) { super(); this.canPause = config.canPause ?? this.canPause; }}