UNPKG

@animech-public/playcanvas

Version:
2 lines (1 loc) 483 B
class e{constructor(e,t,s,h,i=!1){this.handler=void 0,this.name=void 0,this.callback=void 0,this.scope=void 0,this._once=void 0,this._removed=!1,this.handler=e,this.name=t,this.callback=s,this.scope=h,this._once=i}off(){this._removed||this.handler.offByHandle(this)}on(e,t,s=this){return this.handler._addCallback(e,t,s,!1)}once(e,t,s=this){return this.handler._addCallback(e,t,s,!0)}set removed(e){e&&(this._removed=!0)}get removed(){return this._removed}}export{e as EventHandle};