UNPKG

gibbon.js

Version:

Actor/Component system for use with pixi.js.

29 lines 679 B
import { Group } from "./core/group"; export class System extends Group { /** * * @param {Game} game * @param {Actor} clip - system container clip. * @param {boolean} whether to start System immediately. */ constructor(clip, enabled = true) { super(clip, enabled); } enable() { if (!this.enabled) { super.enable(); this.game?.addUpdater(this); } } disable() { if (this.enabled) { super.disable(); this.game?.removeUpdater(this); } } /** * Override in subclasses. */ update(delta) { } } //# sourceMappingURL=system.js.map