gibbon.js
Version:
Actor/Component system for use with pixi.js.
22 lines • 531 B
JavaScript
import { Component } from '../core/component';
/**
* Not fully developed.
* Referencing actor on SharedComponent is not currently safe.
*/
export class SharedComponent extends Component {
_attachCount = 0;
constructor() {
super();
throw Error("Not implemented.");
}
_init(actor) {
super._init(actor);
this._attachCount++;
}
destroy() {
this._attachCount--;
if (this._attachCount <= 0)
super.destroy();
}
}
//# sourceMappingURL=shared.js.map