User prompt
Añade sprites de personaje para hombres osea para el género hombre
User prompt
Has que dependiendo de si eres mujer o hombre tengas un sprite de personaje o otro ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Has que dependiendo de tu personaje tengas más o menos probabilidad de ser contratado en trabajos ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Ahora has la opción de personalizar el personaje canviando de sprite
User prompt
Has que dependiendo si eres hombre o mujer tu interés amoroso tenga una a en el final osea sea compañera de gimnasio y si eres mujer compañero de gimnasio
User prompt
Has que el jugador pueda morir por tener muy baja felicidad y muy mala salud ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Es que sea difícil volver a la normalidad después de seleccionar la opción de vagabundo que sea después de tener un millón de pesos o dólares ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Has opciones de ser vagabundo en el menú de extras para jugar como vagabundo ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Separa las opciones Delos datos del jugador ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Rre as el menú para que sea más bonito
User prompt
Añade la opción de comprar carros ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Ayuda no funciona hacer sonidos ni tu :(
User prompt
Ordena las opciones por ejemplo comer en una sección dentro de extra hacer ejercicio también pertenencia también y asi ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Has que las opciones de comer y hacer ejercicios estén en extras, opciones de vida ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Añade un sistema de años donde la edad máxima sean 150 años y la mínima sea de 1 y dependa de cuánto te alimentes que comas y la salud del personaje ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Añade la opción de ver pertenencias seleccionar que casa vas a comprar comprar carros, anillos, PlayStations, y más ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Añade más trabajos y probabilidades dependiendo de cuánto te paguen de que te contraten ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Has una opción de vender lo que tienes buscar casa y tener hijos y padres ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Has que los eventos especiales tengan muy baja probabilidad de aparecer ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Añade un botón cuando empiezas el juego para extras osea mas opciones ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Añade eventos especiales que tengan probabilidad de aparecer por ejemplo que alguien te quiera contratar y darte 5500 por mes y cosas así ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Añade opción de apostar donde tengas probabilidad de ganar y perder dinero ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Has que después del menú de idiomas te pregunten que genero eres, hombre , mujer. Si eres hombre tengas novia y si eres mujer un novio ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'setText')' in or related to this line: 'moneyDisplay.labelText.setText(getText('money') + ": $" + playerMoney);' Line Number: 317
User prompt
Please fix the bug: 'storage.get is not a function' in or related to this line: 'var currentLanguage = storage.get('language') || 'english';' Line Number: 88 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var ChoiceButton = Container.expand(function (text, action) { var self = Container.call(this); var buttonBg = self.attachAsset('choiceButton', { anchorX: 0.5, anchorY: 0.5 }); var buttonText = new Text2(text, { size: 45, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.action = action; self.down = function (x, y, obj) { LK.getSound('buttonClick').play(); tween(buttonBg, { scaleX: 0.95, scaleY: 0.95 }, { duration: 100 }); if (self.action) { self.action(); } }; self.up = function (x, y, obj) { tween(buttonBg, { scaleX: 1, scaleY: 1 }, { duration: 100 }); }; return self; }); var StatDisplay = Container.expand(function (label, value, color) { var self = Container.call(this); var statBg = self.attachAsset('statBar', { anchorX: 0, anchorY: 0 }); statBg.tint = color || 0x34495e; var labelText = new Text2(label + ": $" + value, { size: 40, fill: 0xFFFFFF }); labelText.anchor.set(0, 0.5); labelText.x = 20; labelText.y = 40; self.addChild(labelText); self.labelText = labelText; // Expose labelText property self.updateValue = function (newValue, prefix) { labelText.setText(label + ": " + (prefix || "$") + newValue); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x1a252f }); /**** * Game Code ****/ // Language and game state variables var currentLanguage = storage.language || 'english'; var showingLanguageMenu = true; var playerMoney = 1000; var playerJob = "Unemployed"; var playerSalary = 0; var playerHappiness = 50; var playerRelationship = "Single"; var playerAge = 22; var monthsUnemployed = 0; var dayCounter = 1; var currentScene = "main"; // Translations var translations = { english: { title: "Life Simulator: Rise to Success", selectLanguage: "Select Language / Seleccionar Idioma", english: "English", spanish: "Español", money: "Money", job: "Job", happiness: "Happiness", relationship: "Relationship", unemployed: "Unemployed", single: "Single", welcome: "Welcome to your adult life! You're starting with $1000. What's your first move?", dayText: "Day", whatToDo: ": What would you like to do today?", lookForJob: "Look for a job", goOnDate: "Go on a date", restAtHome: "Rest at home (+10 happiness)", workExtra: "Work extra hours (+money)", availableJobs: "Available job opportunities:", goBack: "Go back", congratsJob: "Congratulations! You got the job as ", noJob: "Sorry, you didn't get the job. Better luck next time!", needJobFirst: "You need a job first!", "continue": "Continue", askOut: "Ask them out ($100)", justFriends: "Just be friends", notEnoughMoney: "You don't have enough money for a proper date!", wonderfulTime: "Great! You had a wonderful time together!", dateNotWell: "The date didn't go well. Maybe next time!", friendlyChat: "You had a nice friendly conversation!", payday: "Payday! You received $", gameOver: "You've run out of money and can't find work. You're forced to move back with your parents. Game Over!", youWin: "Congratulations! You've achieved financial stability, happiness, and love. You've won at life!", dating: "Dating " }, spanish: { title: "Simulador de Vida: Camino al Éxito", selectLanguage: "Select Language / Seleccionar Idioma", english: "English", spanish: "Español", money: "Dinero", job: "Trabajo", happiness: "Felicidad", relationship: "Relación", unemployed: "Desempleado", single: "Soltero", welcome: "¡Bienvenido a tu vida adulta! Empiezas con $1000. ¿Cuál es tu primer movimiento?", dayText: "Día", whatToDo: ": ¿Qué te gustaría hacer hoy?", lookForJob: "Buscar trabajo", goOnDate: "Ir a una cita", restAtHome: "Descansar en casa (+10 felicidad)", workExtra: "Trabajar horas extra (+dinero)", availableJobs: "Oportunidades de trabajo disponibles:", goBack: "Volver", congratsJob: "¡Felicidades! Conseguiste el trabajo como ", noJob: "Lo siento, no conseguiste el trabajo. ¡Mejor suerte la próxima vez!", needJobFirst: "¡Necesitas un trabajo primero!", "continue": "Continuar", askOut: "Invitarla/o a salir ($100)", justFriends: "Solo ser amigos", notEnoughMoney: "¡No tienes suficiente dinero para una cita apropiada!", wonderfulTime: "¡Genial! ¡Pasaron un tiempo maravilloso juntos!", dateNotWell: "La cita no fue bien. ¡Tal vez la próxima vez!", friendlyChat: "¡Tuviste una conversación amistosa agradable!", payday: "¡Día de pago! Recibiste $", gameOver: "Te quedaste sin dinero y no puedes encontrar trabajo. Te ves obligado a regresar con tus padres. ¡Fin del juego!", youWin: "¡Felicidades! Has logrado estabilidad financiera, felicidad y amor. ¡Has ganado en la vida!", dating: "Saliendo con " } }; function getText(key) { return translations[currentLanguage][key] || key; } // Job data with translations var availableJobs = [{ nameEn: "Fast Food Worker", nameEs: "Trabajador de Comida Rápida", salary: 1200, requirements: "None", happiness: -5 }, { nameEn: "Retail Associate", nameEs: "Asociado de Ventas", salary: 1400, requirements: "None", happiness: -3 }, { nameEn: "Office Assistant", nameEs: "Asistente de Oficina", salary: 2000, requirements: "High School", happiness: 0 }, { nameEn: "Bank Teller", nameEs: "Cajero de Banco", salary: 2800, requirements: "Some Experience", happiness: 5 }, { nameEn: "Software Developer", nameEs: "Desarrollador de Software", salary: 5000, requirements: "College Degree", happiness: 15 }, { nameEn: "Manager", nameEs: "Gerente", salary: 4200, requirements: "Leadership Experience", happiness: 10 }]; function getJobName(job) { return currentLanguage === 'spanish' ? job.nameEs : job.nameEn; } var relationships = [{ nameEn: "Coffee Shop Regular", nameEs: "Cliente Habitual del Café", status: "Stranger", happiness: 5 }, { nameEn: "Gym Partner", nameEs: "Compañero de Gimnasio", status: "Acquaintance", happiness: 8 }, { nameEn: "Coworker", nameEs: "Compañero de Trabajo", status: "Friend", happiness: 12 }]; function getPersonName(person) { return currentLanguage === 'spanish' ? person.nameEs : person.nameEn; } // UI Elements var backgroundPanel = game.addChild(LK.getAsset('backgroundPanel', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366 })); var titleText = new Text2(getText('selectLanguage'), { size: 60, fill: 0xE74C3C }); titleText.anchor.set(0.5, 0); titleText.x = 1024; titleText.y = 150; game.addChild(titleText); // Stats display var moneyDisplay = game.addChild(new StatDisplay(getText('money'), playerMoney, 0x27ae60)); moneyDisplay.x = 224; moneyDisplay.y = 250; var jobDisplay = game.addChild(new StatDisplay(getText('job'), getText('unemployed'), 0x8e44ad)); jobDisplay.x = 224; jobDisplay.y = 350; jobDisplay.updateValue(getText('unemployed'), ""); var happinessDisplay = game.addChild(new StatDisplay(getText('happiness'), playerHappiness + "%", 0xf39c12)); happinessDisplay.x = 224; happinessDisplay.y = 450; happinessDisplay.updateValue(playerHappiness + "%", ""); var relationshipDisplay = game.addChild(new StatDisplay(getText('relationship'), getText('single'), 0xe91e63)); relationshipDisplay.x = 224; relationshipDisplay.y = 550; relationshipDisplay.updateValue(getText('single'), ""); // Event panel var eventPanel = game.addChild(LK.getAsset('eventPanel', { anchorX: 0.5, anchorY: 0, x: 1024, y: 700 })); var eventText = new Text2(getText('selectLanguage'), { size: 42, fill: 0xFFFFFF }); eventText.anchor.set(0.5, 0); eventText.x = 1024; eventText.y = 750; game.addChild(eventText); // Choice buttons var choiceButtons = []; function clearChoices() { for (var i = 0; i < choiceButtons.length; i++) { choiceButtons[i].destroy(); } choiceButtons = []; } function addChoice(text, action) { var button = new ChoiceButton(text, action); button.x = 1024; button.y = 1200 + choiceButtons.length * 140; game.addChild(button); choiceButtons.push(button); } function showLanguageMenu() { titleText.setText(getText('selectLanguage')); eventText.setText(getText('selectLanguage')); clearChoices(); addChoice(getText('english'), function () { currentLanguage = 'english'; storage.language = 'english'; showingLanguageMenu = false; updateUILanguage(); showMainMenu(); }); addChoice(getText('spanish'), function () { currentLanguage = 'spanish'; storage.language = 'spanish'; showingLanguageMenu = false; updateUILanguage(); showMainMenu(); }); } function updateUILanguage() { titleText.setText(getText('title')); moneyDisplay.labelText.setText(getText('money') + ": $" + playerMoney); jobDisplay.labelText.setText(getText('job') + ": " + (playerJob === "Unemployed" ? getText('unemployed') : playerJob)); happinessDisplay.labelText.setText(getText('happiness') + ": " + playerHappiness + "%"); relationshipDisplay.labelText.setText(getText('relationship') + ": " + (playerRelationship === "Single" ? getText('single') : playerRelationship)); } function updateStats() { moneyDisplay.updateValue(playerMoney); var jobText = playerJob === "Unemployed" ? getText('unemployed') : playerJob; jobDisplay.updateValue(jobText, ""); happinessDisplay.updateValue(playerHappiness + "%", ""); var relationshipText = playerRelationship === "Single" ? getText('single') : playerRelationship; relationshipDisplay.updateValue(relationshipText, ""); } function checkGameOver() { if (playerMoney <= 0 && monthsUnemployed >= 3) { eventText.setText(getText('gameOver')); clearChoices(); LK.getSound('failure').play(); LK.setTimeout(function () { LK.showGameOver(); }, 2000); return true; } if (playerMoney >= 10000 && playerHappiness >= 80 && playerRelationship !== getText('single')) { eventText.setText(getText('youWin')); clearChoices(); LK.getSound('success').play(); LK.setTimeout(function () { LK.showYouWin(); }, 2000); return true; } return false; } function showMainMenu() { currentScene = "main"; eventText.setText(getText('dayText') + " " + dayCounter + getText('whatToDo')); clearChoices(); addChoice(getText('lookForJob'), function () { showJobSearch(); }); addChoice(getText('goOnDate'), function () { showDating(); }); addChoice(getText('restAtHome'), function () { playerHappiness = Math.min(100, playerHappiness + 10); playerMoney -= 50; // Daily expenses advanceDay(); }); addChoice(getText('workExtra'), function () { if (playerJob === "Unemployed") { eventText.setText(getText('needJobFirst')); return; } playerMoney += Math.floor(playerSalary * 0.3); playerHappiness = Math.max(0, playerHappiness - 5); playerMoney -= 50; // Daily expenses advanceDay(); }); } function showJobSearch() { currentScene = "jobs"; eventText.setText(getText('availableJobs')); clearChoices(); for (var i = 0; i < Math.min(3, availableJobs.length); i++) { var job = availableJobs[i]; (function (jobData) { addChoice(getJobName(jobData) + " ($" + jobData.salary + "/month)", function () { applyForJob(jobData); }); })(job); } addChoice(getText('goBack'), function () { showMainMenu(); }); } function applyForJob(job) { var chance = Math.random(); if (chance > 0.3) { playerJob = getJobName(job); playerSalary = job.salary; playerHappiness += job.happiness; monthsUnemployed = 0; eventText.setText(getText('congratsJob') + getJobName(job) + "!"); LK.getSound('success').play(); } else { eventText.setText(getText('noJob')); LK.getSound('failure').play(); } clearChoices(); addChoice(getText('continue'), function () { playerMoney -= 50; // Daily expenses advanceDay(); }); } function showDating() { currentScene = "dating"; var person = relationships[Math.floor(Math.random() * relationships.length)]; eventText.setText(currentLanguage === 'spanish' ? "Conoces a " + getPersonName(person) + " en un café local. ¡Parece interesante!" : "You meet " + getPersonName(person) + " at a local cafe. They seem interesting!"); clearChoices(); addChoice(getText('askOut'), function () { if (playerMoney < 100) { eventText.setText(getText('notEnoughMoney')); clearChoices(); addChoice(getText('goBack'), function () { showMainMenu(); }); return; } playerMoney -= 100; var success = Math.random() > 0.4; if (success) { playerHappiness += person.happiness; playerRelationship = getText('dating') + getPersonName(person); eventText.setText(getText('wonderfulTime')); LK.getSound('success').play(); } else { playerHappiness -= 5; eventText.setText(getText('dateNotWell')); LK.getSound('failure').play(); } clearChoices(); addChoice(getText('continue'), function () { playerMoney -= 50; // Daily expenses advanceDay(); }); }); addChoice(getText('justFriends'), function () { playerHappiness += 3; eventText.setText(getText('friendlyChat')); clearChoices(); addChoice(getText('continue'), function () { playerMoney -= 50; // Daily expenses advanceDay(); }); }); addChoice(getText('goBack'), function () { showMainMenu(); }); } function advanceDay() { dayCounter++; // Monthly salary if (dayCounter % 30 === 0 && playerJob !== getText('unemployed')) { playerMoney += playerSalary; eventText.setText(getText('payday') + playerSalary + (currentLanguage === 'spanish' ? " de tu trabajo como " + playerJob : " from your job as " + playerJob)); clearChoices(); addChoice(getText('continue'), function () { checkDailyEvents(); }); return; } // Track unemployment if (playerJob === "Unemployed") { monthsUnemployed++; } // Random events if (Math.random() < 0.1) { showRandomEvent(); } else { checkDailyEvents(); } } function showRandomEvent() { var events = [{ textEn: "You found $50 on the street!", textEs: "¡Encontraste $50 en la calle!", money: 50, happiness: 5 }, { textEn: "Your car broke down. Repair costs $300.", textEs: "Tu auto se descompuso. Los costos de reparación son $300.", money: -300, happiness: -10 }, { textEn: "You won a small lottery prize of $200!", textEs: "¡Ganaste un pequeño premio de lotería de $200!", money: 200, happiness: 15 }, { textEn: "You got sick and had to pay $150 for medicine.", textEs: "Te enfermaste y tuviste que pagar $150 por medicina.", money: -150, happiness: -5 }]; var event = events[Math.floor(Math.random() * events.length)]; playerMoney = Math.max(0, playerMoney + event.money); playerHappiness = Math.max(0, Math.min(100, playerHappiness + event.happiness)); eventText.setText(currentLanguage === 'spanish' ? event.textEs : event.textEn); clearChoices(); addChoice(getText('continue'), function () { checkDailyEvents(); }); } function checkDailyEvents() { updateStats(); if (checkGameOver()) { return; } showMainMenu(); } // Initialize the game if (showingLanguageMenu) { showLanguageMenu(); } else { updateUILanguage(); showMainMenu(); }
===================================================================
--- original.js
+++ change.js
@@ -56,8 +56,9 @@
labelText.anchor.set(0, 0.5);
labelText.x = 20;
labelText.y = 40;
self.addChild(labelText);
+ self.labelText = labelText; // Expose labelText property
self.updateValue = function (newValue, prefix) {
labelText.setText(label + ": " + (prefix || "$") + newValue);
};
return self;
Personaje artística viendo a la cámara pixel art. In-Game asset. 2d. High contrast. No shadows
Hombre atlético mirando a la cámara pixel art. In-Game asset. 2d. High contrast. No shadows
Hombre trabajador mirando a la cámara pixel art. In-Game asset. 2d. High contrast. No shadows
Hombre ejecutivo mirando a la cámara pixel art. In-Game asset. 2d. High contrast. No shadows
Personaje hombre casual mirando a la cámara pixel art. In-Game asset. 2d. High contrast. No shadows