gdjs.bossfight2Code = {}; gdjs.bossfight2Code.localVariables = []; gdjs.bossfight2Code.idToCallbackMap = new Map(); gdjs.bossfight2Code.GDFireButtonObjects1_1final = []; gdjs.bossfight2Code.GDNewTiledSpriteObjects1= []; gdjs.bossfight2Code.GDNewTiledSpriteObjects2= []; gdjs.bossfight2Code.GDNewTiledSpriteObjects3= []; gdjs.bossfight2Code.GDNewTiledSprite2Objects1= []; gdjs.bossfight2Code.GDNewTiledSprite2Objects2= []; gdjs.bossfight2Code.GDNewTiledSprite2Objects3= []; gdjs.bossfight2Code.GDPlayerObjects1= []; gdjs.bossfight2Code.GDPlayerObjects2= []; gdjs.bossfight2Code.GDPlayerObjects3= []; gdjs.bossfight2Code.GDFlatDarkJoystickObjects1= []; gdjs.bossfight2Code.GDFlatDarkJoystickObjects2= []; gdjs.bossfight2Code.GDFlatDarkJoystickObjects3= []; gdjs.bossfight2Code.GDBerryObjects1= []; gdjs.bossfight2Code.GDBerryObjects2= []; gdjs.bossfight2Code.GDBerryObjects3= []; gdjs.bossfight2Code.GDBerryNormalSpawnObjects1= []; gdjs.bossfight2Code.GDBerryNormalSpawnObjects2= []; gdjs.bossfight2Code.GDBerryNormalSpawnObjects3= []; gdjs.bossfight2Code.GDbosshptetxObjects1= []; gdjs.bossfight2Code.GDbosshptetxObjects2= []; gdjs.bossfight2Code.GDbosshptetxObjects3= []; gdjs.bossfight2Code.GDNewTiledSprite4Objects1= []; gdjs.bossfight2Code.GDNewTiledSprite4Objects2= []; gdjs.bossfight2Code.GDNewTiledSprite4Objects3= []; gdjs.bossfight2Code.GDSpeedySpawnerObjects1= []; gdjs.bossfight2Code.GDSpeedySpawnerObjects2= []; gdjs.bossfight2Code.GDSpeedySpawnerObjects3= []; gdjs.bossfight2Code.GDSpeedyObjects1= []; gdjs.bossfight2Code.GDSpeedyObjects2= []; gdjs.bossfight2Code.GDSpeedyObjects3= []; gdjs.bossfight2Code.GDcpObjects1= []; gdjs.bossfight2Code.GDcpObjects2= []; gdjs.bossfight2Code.GDcpObjects3= []; gdjs.bossfight2Code.GDPhysiscsObjects1= []; gdjs.bossfight2Code.GDPhysiscsObjects2= []; gdjs.bossfight2Code.GDPhysiscsObjects3= []; gdjs.bossfight2Code.GDRNGBerryObjects1= []; gdjs.bossfight2Code.GDRNGBerryObjects2= []; gdjs.bossfight2Code.GDRNGBerryObjects3= []; gdjs.bossfight2Code.GDrngspawnObjects1= []; gdjs.bossfight2Code.GDrngspawnObjects2= []; gdjs.bossfight2Code.GDrngspawnObjects3= []; gdjs.bossfight2Code.GDExplotionObjects1= []; gdjs.bossfight2Code.GDExplotionObjects2= []; gdjs.bossfight2Code.GDExplotionObjects3= []; gdjs.bossfight2Code.GDKingCarlosObjects1= []; gdjs.bossfight2Code.GDKingCarlosObjects2= []; gdjs.bossfight2Code.GDKingCarlosObjects3= []; gdjs.bossfight2Code.GDPlayer2Objects1= []; gdjs.bossfight2Code.GDPlayer2Objects2= []; gdjs.bossfight2Code.GDPlayer2Objects3= []; gdjs.bossfight2Code.GDFireButtonObjects1= []; gdjs.bossfight2Code.GDFireButtonObjects2= []; gdjs.bossfight2Code.GDFireButtonObjects3= []; gdjs.bossfight2Code.GDcontrollerObjects1= []; gdjs.bossfight2Code.GDcontrollerObjects2= []; gdjs.bossfight2Code.GDcontrollerObjects3= []; gdjs.bossfight2Code.GDexplosionObjects1= []; gdjs.bossfight2Code.GDexplosionObjects2= []; gdjs.bossfight2Code.GDexplosionObjects3= []; gdjs.bossfight2Code.GDbosstextObjects1= []; gdjs.bossfight2Code.GDbosstextObjects2= []; gdjs.bossfight2Code.GDbosstextObjects3= []; gdjs.bossfight2Code.GDNewTextObjects1= []; gdjs.bossfight2Code.GDNewTextObjects2= []; gdjs.bossfight2Code.GDNewTextObjects3= []; gdjs.bossfight2Code.GDNewText3Objects1= []; gdjs.bossfight2Code.GDNewText3Objects2= []; gdjs.bossfight2Code.GDNewText3Objects3= []; gdjs.bossfight2Code.GDNewTiledSprite3Objects1= []; gdjs.bossfight2Code.GDNewTiledSprite3Objects2= []; gdjs.bossfight2Code.GDNewTiledSprite3Objects3= []; gdjs.bossfight2Code.GDThePainterObjects1= []; gdjs.bossfight2Code.GDThePainterObjects2= []; gdjs.bossfight2Code.GDThePainterObjects3= []; gdjs.bossfight2Code.GDNewTiledSprite5Objects1= []; gdjs.bossfight2Code.GDNewTiledSprite5Objects2= []; gdjs.bossfight2Code.GDNewTiledSprite5Objects3= []; gdjs.bossfight2Code.GDNewSpriteObjects1= []; gdjs.bossfight2Code.GDNewSpriteObjects2= []; gdjs.bossfight2Code.GDNewSpriteObjects3= []; gdjs.bossfight2Code.asyncCallback20437460 = function (runtimeScene, asyncObjectsList) { asyncObjectsList.restoreLocalVariablesContainers(gdjs.bossfight2Code.localVariables); gdjs.bossfight2Code.localVariables.length = 0; } gdjs.bossfight2Code.idToCallbackMap.set(20437460, gdjs.bossfight2Code.asyncCallback20437460); gdjs.bossfight2Code.eventsList0 = function(runtimeScene) { { { { const asyncObjectsList = new gdjs.LongLivedObjectsList(); asyncObjectsList.backupLocalVariablesContainers(gdjs.bossfight2Code.localVariables); runtimeScene.getAsyncTasksManager().addTask(gdjs.evtTools.runtimeScene.wait(8), (runtimeScene) => (gdjs.bossfight2Code.asyncCallback20437460(runtimeScene, asyncObjectsList)), 20437460, asyncObjectsList); } } } };gdjs.bossfight2Code.userFunc0xf649f8 = function GDJSInlineCode(runtimeScene, objects) { "use strict"; // Obtenemos la escena actual const scene = runtimeScene; // Configuración del spawner const minX = 0; // Límite izquierdo de aparición const maxX = scene.getGame().getGameResolutionWidth(); // Límite derecho (ancho de pantalla) const spawnY = -50; // Posición inicial (un poco arriba de la pantalla) const berryTypes = ["poisonberry", "MinusBerry"]; // Intervalo en segundos entre cada spawn const spawnInterval = 1.5; // Verificamos si el temporizador existe; si no, lo creamos if (!scene.getVariables().has("berryTimer")) { scene.getVariables().get("berryTimer").setNumber(0); } // Incrementamos el temporizador con el tiempo del frame actual scene.getVariables().get("berryTimer").add(scene.getTimeManager().getElapsedTime() / 1000); // Cuando el temporizador supera el intervalo... if (scene.getVariables().get("berryTimer").getAsNumber() >= spawnInterval) { // Reseteamos el temporizador scene.getVariables().get("berryTimer").setNumber(0); // Elegimos un tipo de berry al azar const randomBerryName = berryTypes[Math.floor(Math.random() * berryTypes.length)]; // Posición aleatoria en el eje X const randomX = Math.random() * (maxX - minX) + minX; // Creamos la berry en la escena const berry = scene.createObject(randomBerryName); if (berry) { berry.setPosition(randomX, spawnY); } } }; gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDcontrollerObjects1Objects = Hashtable.newFrom({"controller": gdjs.bossfight2Code.GDcontrollerObjects1}); gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDThePainterObjects1Objects = Hashtable.newFrom({"ThePainter": gdjs.bossfight2Code.GDThePainterObjects1}); gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDexplosionObjects1Objects = Hashtable.newFrom({"explosion": gdjs.bossfight2Code.GDexplosionObjects1}); gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDcontrollerObjects2Objects = Hashtable.newFrom({"controller": gdjs.bossfight2Code.GDcontrollerObjects2}); gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDcontrollerObjects2Objects = Hashtable.newFrom({"controller": gdjs.bossfight2Code.GDcontrollerObjects2}); gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDcontrollerObjects1Objects = Hashtable.newFrom({"controller": gdjs.bossfight2Code.GDcontrollerObjects1}); gdjs.bossfight2Code.eventsList1 = function(runtimeScene) { { gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.bossfight2Code.GDPlayerObjects2); let isConditionTrue_0 = false; isConditionTrue_0 = false; for (var i = 0, k = 0, l = gdjs.bossfight2Code.GDPlayerObjects2.length;i (gdjs.bossfight2Code.asyncCallback20454228(runtimeScene, asyncObjectsList)), 20454228, asyncObjectsList); } } } };gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDNewTextObjects1Objects = Hashtable.newFrom({"NewText": gdjs.bossfight2Code.GDNewTextObjects1}); gdjs.bossfight2Code.eventsList3 = function(runtimeScene, asyncObjectsList) { { let isConditionTrue_0 = false; { /* Reuse gdjs.bossfight2Code.GDNewTextObjects2 */ {for(var i = 0, len = gdjs.bossfight2Code.GDNewTextObjects2.length ;i < len;++i) { gdjs.bossfight2Code.GDNewTextObjects2[i].getBehavior("Opacity").setOpacity(gdjs.bossfight2Code.GDNewTextObjects2[i].getBehavior("Opacity").getOpacity() - (10)); } } } } };gdjs.bossfight2Code.asyncCallback20457316 = function (runtimeScene, asyncObjectsList) { asyncObjectsList.restoreLocalVariablesContainers(gdjs.bossfight2Code.localVariables); gdjs.copyArray(asyncObjectsList.getObjects("NewText"), gdjs.bossfight2Code.GDNewTextObjects2); {for(var i = 0, len = gdjs.bossfight2Code.GDNewTextObjects2.length ;i < len;++i) { gdjs.bossfight2Code.GDNewTextObjects2[i].deleteFromScene(runtimeScene); } } { //Subevents gdjs.bossfight2Code.eventsList3(runtimeScene, asyncObjectsList);} //End of subevents gdjs.bossfight2Code.localVariables.length = 0; } gdjs.bossfight2Code.idToCallbackMap.set(20457316, gdjs.bossfight2Code.asyncCallback20457316); gdjs.bossfight2Code.eventsList4 = function(runtimeScene) { { { { const asyncObjectsList = new gdjs.LongLivedObjectsList(); asyncObjectsList.backupLocalVariablesContainers(gdjs.bossfight2Code.localVariables); for (const obj of gdjs.bossfight2Code.GDNewTextObjects1) asyncObjectsList.addObject("NewText", obj); runtimeScene.getAsyncTasksManager().addTask(gdjs.evtTools.runtimeScene.wait(1), (runtimeScene) => (gdjs.bossfight2Code.asyncCallback20457316(runtimeScene, asyncObjectsList)), 20457316, asyncObjectsList); } } } };gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDThePainterObjects1Objects = Hashtable.newFrom({"ThePainter": gdjs.bossfight2Code.GDThePainterObjects1}); gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDPlayerObjects1Objects = Hashtable.newFrom({"Player": gdjs.bossfight2Code.GDPlayerObjects1}); gdjs.bossfight2Code.eventsList5 = function(runtimeScene, asyncObjectsList) { { let isConditionTrue_0 = false; { gdjs.copyArray(runtimeScene.getObjects("NewText"), gdjs.bossfight2Code.GDNewTextObjects2); {for(var i = 0, len = gdjs.bossfight2Code.GDNewTextObjects2.length ;i < len;++i) { gdjs.bossfight2Code.GDNewTextObjects2[i].getBehavior("Opacity").setOpacity(gdjs.bossfight2Code.GDNewTextObjects2[i].getBehavior("Opacity").getOpacity() - (10)); } } } } };gdjs.bossfight2Code.asyncCallback20460484 = function (runtimeScene, asyncObjectsList) { asyncObjectsList.restoreLocalVariablesContainers(gdjs.bossfight2Code.localVariables); {gdjs.evtTools.runtimeScene.replaceScene(runtimeScene, "bossfight2", false); } { //Subevents gdjs.bossfight2Code.eventsList5(runtimeScene, asyncObjectsList);} //End of subevents gdjs.bossfight2Code.localVariables.length = 0; } gdjs.bossfight2Code.idToCallbackMap.set(20460484, gdjs.bossfight2Code.asyncCallback20460484); gdjs.bossfight2Code.eventsList6 = function(runtimeScene) { { { { const asyncObjectsList = new gdjs.LongLivedObjectsList(); asyncObjectsList.backupLocalVariablesContainers(gdjs.bossfight2Code.localVariables); runtimeScene.getAsyncTasksManager().addTask(gdjs.evtTools.runtimeScene.wait(1), (runtimeScene) => (gdjs.bossfight2Code.asyncCallback20460484(runtimeScene, asyncObjectsList)), 20460484, asyncObjectsList); } } } };gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDcontrollerObjects2Objects = Hashtable.newFrom({"controller": gdjs.bossfight2Code.GDcontrollerObjects2}); gdjs.bossfight2Code.mapOfGDgdjs_9546bossfight2Code_9546GDcontrollerObjects2Objects = Hashtable.newFrom({"controller": gdjs.bossfight2Code.GDcontrollerObjects2}); gdjs.bossfight2Code.eventsList7 = function(runtimeScene) { { gdjs.copyArray(runtimeScene.getObjects("Player"), gdjs.bossfight2Code.GDPlayerObjects2); let isConditionTrue_0 = false; isConditionTrue_0 = false; for (var i = 0, k = 0, l = gdjs.bossfight2Code.GDPlayerObjects2.length;i