gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping = gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping || {}; /** * Behavior generated from Auto typing text */ gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping = class BitmapText_AutoTyping 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__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.getSharedData( instanceContainer, behaviorData.name ); this._behaviorData.Interval = behaviorData.Interval !== undefined ? behaviorData.Interval : Number("0.05") || 0; this._behaviorData.CharacterJustAdded = false; this._behaviorData.CurrentCharacter = ""; } // Hot-reload: updateFromBehaviorData(oldBehaviorData, newBehaviorData) { if (oldBehaviorData.Interval !== newBehaviorData.Interval) this._behaviorData.Interval = newBehaviorData.Interval; if (oldBehaviorData.CharacterJustAdded !== newBehaviorData.CharacterJustAdded) this._behaviorData.CharacterJustAdded = newBehaviorData.CharacterJustAdded; if (oldBehaviorData.CurrentCharacter !== newBehaviorData.CurrentCharacter) this._behaviorData.CurrentCharacter = newBehaviorData.CurrentCharacter; return true; } // Properties: _getInterval() { return this._behaviorData.Interval !== undefined ? this._behaviorData.Interval : Number("0.05") || 0; } _setInterval(newValue) { this._behaviorData.Interval = newValue; } _getCharacterJustAdded() { return this._behaviorData.CharacterJustAdded !== undefined ? this._behaviorData.CharacterJustAdded : false; } _setCharacterJustAdded(newValue) { this._behaviorData.CharacterJustAdded = newValue; } _toggleCharacterJustAdded() { this._setCharacterJustAdded(!this._getCharacterJustAdded()); } _getCurrentCharacter() { return this._behaviorData.CurrentCharacter !== undefined ? this._behaviorData.CurrentCharacter : ""; } _setCurrentCharacter(newValue) { this._behaviorData.CurrentCharacter = newValue; } } /** * Shared data generated from Auto typing text */ gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.SharedData = class BitmapText_AutoTypingSharedData { constructor(sharedData) { } // Shared properties: } gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.getSharedData = function(instanceContainer, behaviorName) { if (!instanceContainer._AutoTyping_BitmapText_AutoTypingSharedData) { const initialData = instanceContainer.getInitialSharedDataForBehavior( behaviorName ); instanceContainer._AutoTyping_BitmapText_AutoTypingSharedData = new gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.SharedData( initialData ); } return instanceContainer._AutoTyping_BitmapText_AutoTypingSharedData; } // Methods: gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext = {}; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects1= []; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects2= []; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.eventsList0 = function(runtimeScene, eventsFunctionContext) { { let isConditionTrue_0 = false; { gdjs.copyArray(eventsFunctionContext.getObjects("Object"), gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects1); {for(var i = 0, len = gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects1.length ;i < len;++i) { gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects1[i].returnVariable(gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects1[i].getVariables().get("__AutoTyping").getChild("txt_buffer")).setString((gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects1[i].getText())); } }{for(var i = 0, len = gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects1.length ;i < len;++i) { gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects1[i].getBehavior(eventsFunctionContext.getBehaviorName("Behavior")).StartAtBeginning((typeof eventsFunctionContext !== 'undefined' ? eventsFunctionContext : undefined)); } }} } };gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.eventsList1 = function(runtimeScene, eventsFunctionContext) { { gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.eventsList0(runtimeScene, eventsFunctionContext); } }; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreated = function(parentEventsFunctionContext) { var that = this; var runtimeScene = this._runtimeScene; var thisObjectList = [this.owner]; var Object = Hashtable.newFrom({Object: thisObjectList}); var Behavior = this.name; var eventsFunctionContext = { _objectsMap: { "Object": Object }, _objectArraysMap: { "Object": thisObjectList }, _behaviorNamesMap: { "Behavior": Behavior }, getObjects: function(objectName) { return eventsFunctionContext._objectArraysMap[objectName] || []; }, getObjectsLists: function(objectName) { return eventsFunctionContext._objectsMap[objectName] || null; }, getBehaviorName: function(behaviorName) { return eventsFunctionContext._behaviorNamesMap[behaviorName] || behaviorName; }, createObject: function(objectName) { const objectsList = eventsFunctionContext._objectsMap[objectName]; if (objectsList) { const object = parentEventsFunctionContext ? parentEventsFunctionContext.createObject(objectsList.firstKey()) : runtimeScene.createObject(objectsList.firstKey()); if (object) { objectsList.get(objectsList.firstKey()).push(object); eventsFunctionContext._objectArraysMap[objectName].push(object); } return object; } return null; }, getInstancesCountOnScene: function(objectName) { const objectsList = eventsFunctionContext._objectsMap[objectName]; let count = 0; if (objectsList) { for(const objectName in objectsList.items) count += parentEventsFunctionContext ? parentEventsFunctionContext.getInstancesCountOnScene(objectName) : runtimeScene.getInstancesCountOnScene(objectName); } return count; }, getLayer: function(layerName) { return runtimeScene.getLayer(layerName); }, getArgument: function(argName) { return ""; }, getOnceTriggers: function() { return that._onceTriggers; } }; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects1.length = 0; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.GDObjectObjects2.length = 0; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.onCreatedContext.eventsList1(runtimeScene, eventsFunctionContext); return; } gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext = {}; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects1= []; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects2= []; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects3= []; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.eventsList0 = function(runtimeScene, eventsFunctionContext) { { let isConditionTrue_0 = false; { gdjs.copyArray(eventsFunctionContext.getObjects("Object"), gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects1); {for(var i = 0, len = gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects1.length ;i < len;++i) { gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects1[i].getBehavior(eventsFunctionContext.getBehaviorName("Behavior"))._setCharacterJustAdded(false); } }} } };gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.eventsList1 = function(runtimeScene, eventsFunctionContext) { { /* Reuse gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects2 */ let isConditionTrue_0 = false; isConditionTrue_0 = false; for (var i = 0, k = 0, l = gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects2.length;i gdjs.evtTools.string.strLen((gdjs.RuntimeObject.getVariableString(gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects1[i].getVariables().get("__AutoTyping").getChild("txt_buffer")))) ) { isConditionTrue_0 = true; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects1[k] = gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects1[i]; ++k; } } gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects1.length = k; if (isConditionTrue_0) { {gdjs.evtTools.runtimeScene.removeTimer(runtimeScene, "__AutoTyping.WriteTimer"); } { //Subevents gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.eventsList2(runtimeScene, eventsFunctionContext);} //End of subevents } } };gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.eventsList4 = function(runtimeScene, eventsFunctionContext) { { gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.eventsList0(runtimeScene, eventsFunctionContext); } { gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.eventsList3(runtimeScene, eventsFunctionContext); } }; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEvents = function(parentEventsFunctionContext) { var that = this; var runtimeScene = this._runtimeScene; var thisObjectList = [this.owner]; var Object = Hashtable.newFrom({Object: thisObjectList}); var Behavior = this.name; var eventsFunctionContext = { _objectsMap: { "Object": Object }, _objectArraysMap: { "Object": thisObjectList }, _behaviorNamesMap: { "Behavior": Behavior }, getObjects: function(objectName) { return eventsFunctionContext._objectArraysMap[objectName] || []; }, getObjectsLists: function(objectName) { return eventsFunctionContext._objectsMap[objectName] || null; }, getBehaviorName: function(behaviorName) { return eventsFunctionContext._behaviorNamesMap[behaviorName] || behaviorName; }, createObject: function(objectName) { const objectsList = eventsFunctionContext._objectsMap[objectName]; if (objectsList) { const object = parentEventsFunctionContext ? parentEventsFunctionContext.createObject(objectsList.firstKey()) : runtimeScene.createObject(objectsList.firstKey()); if (object) { objectsList.get(objectsList.firstKey()).push(object); eventsFunctionContext._objectArraysMap[objectName].push(object); } return object; } return null; }, getInstancesCountOnScene: function(objectName) { const objectsList = eventsFunctionContext._objectsMap[objectName]; let count = 0; if (objectsList) { for(const objectName in objectsList.items) count += parentEventsFunctionContext ? parentEventsFunctionContext.getInstancesCountOnScene(objectName) : runtimeScene.getInstancesCountOnScene(objectName); } return count; }, getLayer: function(layerName) { return runtimeScene.getLayer(layerName); }, getArgument: function(argName) { return ""; }, getOnceTriggers: function() { return that._onceTriggers; } }; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects1.length = 0; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects2.length = 0; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.GDObjectObjects3.length = 0; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.doStepPostEventsContext.eventsList4(runtimeScene, eventsFunctionContext); return; } gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext = {}; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.GDObjectObjects1= []; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.GDObjectObjects2= []; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.eventsList0 = function(runtimeScene, eventsFunctionContext) { { gdjs.copyArray(eventsFunctionContext.getObjects("Object"), gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.GDObjectObjects1); let isConditionTrue_0 = false; isConditionTrue_0 = false; for (var i = 0, k = 0, l = gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.GDObjectObjects1.length;i= gdjs.evtTools.string.strLen((gdjs.RuntimeObject.getVariableString(gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.GDObjectObjects1[i].getVariables().get("__AutoTyping").getChild("txt_buffer")))) ) { isConditionTrue_0 = true; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.GDObjectObjects1[k] = gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.GDObjectObjects1[i]; ++k; } } gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.GDObjectObjects1.length = k; if (isConditionTrue_0) { {if (typeof eventsFunctionContext !== 'undefined') { eventsFunctionContext.returnValue = true; }}} } }; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinished = function(parentEventsFunctionContext) { var that = this; var runtimeScene = this._runtimeScene; var thisObjectList = [this.owner]; var Object = Hashtable.newFrom({Object: thisObjectList}); var Behavior = this.name; var eventsFunctionContext = { _objectsMap: { "Object": Object }, _objectArraysMap: { "Object": thisObjectList }, _behaviorNamesMap: { "Behavior": Behavior }, getObjects: function(objectName) { return eventsFunctionContext._objectArraysMap[objectName] || []; }, getObjectsLists: function(objectName) { return eventsFunctionContext._objectsMap[objectName] || null; }, getBehaviorName: function(behaviorName) { return eventsFunctionContext._behaviorNamesMap[behaviorName] || behaviorName; }, createObject: function(objectName) { const objectsList = eventsFunctionContext._objectsMap[objectName]; if (objectsList) { const object = parentEventsFunctionContext ? parentEventsFunctionContext.createObject(objectsList.firstKey()) : runtimeScene.createObject(objectsList.firstKey()); if (object) { objectsList.get(objectsList.firstKey()).push(object); eventsFunctionContext._objectArraysMap[objectName].push(object); } return object; } return null; }, getInstancesCountOnScene: function(objectName) { const objectsList = eventsFunctionContext._objectsMap[objectName]; let count = 0; if (objectsList) { for(const objectName in objectsList.items) count += parentEventsFunctionContext ? parentEventsFunctionContext.getInstancesCountOnScene(objectName) : runtimeScene.getInstancesCountOnScene(objectName); } return count; }, getLayer: function(layerName) { return runtimeScene.getLayer(layerName); }, getArgument: function(argName) { return ""; }, getOnceTriggers: function() { return that._onceTriggers; } }; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.GDObjectObjects1.length = 0; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.GDObjectObjects2.length = 0; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingFinishedContext.eventsList0(runtimeScene, eventsFunctionContext); return !!eventsFunctionContext.returnValue; } gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingPauseContext = {}; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingPauseContext.GDObjectObjects1= []; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingPauseContext.GDObjectObjects2= []; gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingPauseContext.eventsList0 = function(runtimeScene, eventsFunctionContext) { { gdjs.copyArray(eventsFunctionContext.getObjects("Object"), gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingPauseContext.GDObjectObjects1); let isConditionTrue_0 = false; isConditionTrue_0 = false; for (var i = 0, k = 0, l = gdjs.evtsExt__AutoTyping__BitmapText_AutoTyping.BitmapText_AutoTyping.prototype.TypingPauseContext.GDObjectObjects1.length;i