var gdjs;(function(n){class v{constructor(t){this.minX=0;this.minY=0;this.maxX=0;this.maxY=0;this.behavior=t,this.updateAABBFromOwner()}updateAABBFromOwner(){this.minX=this.behavior.owner.getAABB().min[0],this.minY=this.behavior.owner.getAABB().min[1],this.maxX=this.behavior.owner.getAABB().max[0],this.maxY=this.behavior.owner.getAABB().max[1]}}n.BehaviorRBushAABB=v;class c{constructor(t,e,a){this.owner=a;this._syncOverNetwork=!0;this.name=e.name||"",this.type=e.type||"",this._nameId=n.RuntimeObject.getNameIdentifier(this.name);const i=t.getGame();this._activated=!i.isInGameEdition()||!!i.isBehaviorActivatedByDefaultInEditor(this.type)}updateFromBehaviorData(t,e){const a={name:e.name,type:e.type};for(const i in a){const s=t[i],o=e[i];o!==s&&(a[i]=o)}return this.applyBehaviorOverriding(a)}applyBehaviorOverriding(t){return!1}getNetworkSyncData(t){return{act:this._activated,props:{}}}updateFromNetworkSyncData(t,e){t.act!==this._activated&&this.activate(t.act)}getName(){return this.name}getNameId(){return this._nameId}stepPreEvents(t){if(this._activated){const e=t.getScene().getProfiler();e&&e.begin(this.name),this.doStepPreEvents(t),e&&e.end(this.name)}}stepPostEvents(t){if(this._activated){const e=t.getScene().getProfiler();e&&e.begin(this.name),this.doStepPostEvents(t),e&&e.end(this.name)}}activate(t){t===void 0&&(t=!0),!this._activated&&t?(this._activated=!0,this.onActivate()):this._activated&&!t&&(this._activated=!1,this.onDeActivate())}onCreated(){}activated(){return this._activated}onActivate(){}onDeActivate(){}doStepPreEvents(t){}doStepPostEvents(t){}onDestroy(){}onObjectHotReloaded(){}usesLifecycleFunction(){return!0}enableSynchronization(t){this._syncOverNetwork=t}isSyncedOverNetwork(){return this._syncOverNetwork}}n.RuntimeBehavior=c,n.registerBehavior("",n.RuntimeBehavior)})(gdjs||(gdjs={}));
//# sourceMappingURL=runtimebehavior.js.map
