gdjs.evtsExt__PanelSpriteButton__ButtonFSM = gdjs.evtsExt__PanelSpriteButton__ButtonFSM || {}; /** * Behavior generated from Button finite state machine */ gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM = class ButtonFSM extends gdjs.RuntimeBehavior { constructor(instanceContainer, behaviorData, owner) { super(instanceContainer, behaviorData, owner); this._runtimeScene = instanceContainer; this._onceTriggers = new gdjs.OnceTriggers(); this._behaviorData = {}; this._sharedData = gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.getSharedData( instanceContainer, behaviorData.name ); this._behaviorData.ShouldCheckHovering = true; this._behaviorData.State = "Idle"; this._behaviorData.TouchId = Number("0") || 0; this._behaviorData.TouchIsInside = false; this._behaviorData.MouseIsInside = false; this._behaviorData.Index = Number("") || 0; } // Hot-reload: updateFromBehaviorData(oldBehaviorData, newBehaviorData) { if (oldBehaviorData.ShouldCheckHovering !== newBehaviorData.ShouldCheckHovering) this._behaviorData.ShouldCheckHovering = newBehaviorData.ShouldCheckHovering; if (oldBehaviorData.State !== newBehaviorData.State) this._behaviorData.State = newBehaviorData.State; if (oldBehaviorData.TouchId !== newBehaviorData.TouchId) this._behaviorData.TouchId = newBehaviorData.TouchId; if (oldBehaviorData.TouchIsInside !== newBehaviorData.TouchIsInside) this._behaviorData.TouchIsInside = newBehaviorData.TouchIsInside; if (oldBehaviorData.MouseIsInside !== newBehaviorData.MouseIsInside) this._behaviorData.MouseIsInside = newBehaviorData.MouseIsInside; if (oldBehaviorData.Index !== newBehaviorData.Index) this._behaviorData.Index = newBehaviorData.Index; return true; } // Properties: _getShouldCheckHovering() { return this._behaviorData.ShouldCheckHovering !== undefined ? this._behaviorData.ShouldCheckHovering : true; } _setShouldCheckHovering(newValue) { this._behaviorData.ShouldCheckHovering = newValue; } _toggleShouldCheckHovering() { this._setShouldCheckHovering(!this._getShouldCheckHovering()); } _getState() { return this._behaviorData.State !== undefined ? this._behaviorData.State : "Idle"; } _setState(newValue) { this._behaviorData.State = newValue; } _getTouchId() { return this._behaviorData.TouchId !== undefined ? this._behaviorData.TouchId : Number("0") || 0; } _setTouchId(newValue) { this._behaviorData.TouchId = newValue; } _getTouchIsInside() { return this._behaviorData.TouchIsInside !== undefined ? this._behaviorData.TouchIsInside : false; } _setTouchIsInside(newValue) { this._behaviorData.TouchIsInside = newValue; } _toggleTouchIsInside() { this._setTouchIsInside(!this._getTouchIsInside()); } _getMouseIsInside() { return this._behaviorData.MouseIsInside !== undefined ? this._behaviorData.MouseIsInside : false; } _setMouseIsInside(newValue) { this._behaviorData.MouseIsInside = newValue; } _toggleMouseIsInside() { this._setMouseIsInside(!this._getMouseIsInside()); } _getIndex() { return this._behaviorData.Index !== undefined ? this._behaviorData.Index : Number("") || 0; } _setIndex(newValue) { this._behaviorData.Index = newValue; } } /** * Shared data generated from Button finite state machine */ gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.SharedData = class ButtonFSMSharedData { constructor(sharedData) { } // Shared properties: } gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.getSharedData = function(instanceContainer, behaviorName) { if (!instanceContainer._PanelSpriteButton_ButtonFSMSharedData) { const initialData = instanceContainer.getInitialSharedDataForBehavior( behaviorName ); instanceContainer._PanelSpriteButton_ButtonFSMSharedData = new gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.SharedData( initialData ); } return instanceContainer._PanelSpriteButton_ButtonFSMSharedData; } // Methods: gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext = {}; gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects4_1final = []; gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects1= []; gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects2= []; gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects3= []; gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects4= []; gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects5= []; gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.eventsList0 = function(runtimeScene, eventsFunctionContext) { { } { let isConditionTrue_0 = false; { gdjs.copyArray(eventsFunctionContext.getObjects("Object"), gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects3); {for(var i = 0, len = gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects3.length ;i < len;++i) { gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects3[i].getBehavior(eventsFunctionContext.getBehaviorName("Behavior"))._setMouseIsInside(false); } }} } { gdjs.copyArray(eventsFunctionContext.getObjects("Object"), gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects3); let isConditionTrue_0 = false; isConditionTrue_0 = false; for (var i = 0, k = 0, l = gdjs.evtsExt__PanelSpriteButton__ButtonFSM.ButtonFSM.prototype.doStepPostEventsContext.GDObjectObjects3.length;i