User prompt
meyve sebzelerin ne kadar olduğunu gösteren yazı diğer yazılar ile iç içe geçiyor bunu düzelt
User prompt
yazılar halen pek iyi görünmüyor butonlara dounmadan yazıları büyüt
User prompt
farm ve employees butonlarına basılınca açılan sayfadaki butonların üzerindeki yazılar pek okunmuyor 5x satın alma ve 5x satma butonlarını kaldır kalan buton ve görüntülerı daha iyibir okunabilirlik icin minumu oranda büyüt
User prompt
tasks butonunuda büyüt
User prompt
farm ve employees butonunun içindeki yazılar pek okunmuyor butonları yazıların daha iyi okunabilmesi iin minumm oranda büyüt
User prompt
far butonunun içindeki tüm butonları sil ve en baştan tasarla
User prompt
buy ve sell butonları arasındak boşluk miktarını artır birbirlerine yapışık kalmasınlar
User prompt
buy ve sell butonları arasındak boşluk miktarını artır birbirlerine yapışık kalmasınlar
User prompt
far butonndaki bütün butonları sil sadece satın al sat ve meyve sebzelerin görüntüsü kalsın
User prompt
aralarındaki boşluk mesafesini 50 yap
User prompt
farm butonunun içindeki butonların arasındaki boşluk miktarını minumum 4 yap
User prompt
butonları eskı halıne getır aralarındakı boşluk mesafesini doğru orantı kullanarak ayarla ve butonların boyutunu 2 katına çıkararak yazıların daha iyi okunabilmesini sağla
User prompt
farm ve employees butonlarının ıcıde bulunan butonların boyutunu 3 katına çıkar
User prompt
ana menüde iken para miktarı artmasın
User prompt
ana menü ve oyun ekranına müzik ekle ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
options butonuna basılınca sekme açılsın ve bu sekmede oyun müziğini aç kapa yapmaya yarayan buton bulunsun ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
oyunun adını sil ve normal bir şekilde yaz
User prompt
aynı dogrultuda olucaklar
User prompt
oyunun adını sil ve hilal şeklinde tekrar yaz
User prompt
oyuna basit bir ana menü ekle ana menüde start optıons ve how to play olmak üzere 3 adet buton bulunucak ve oyunun adı olan MANAV TİME! 180 derece açıyla yazılmış olucak ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
her personelden maksimum 5 adet bulundurulabilsin
User prompt
çarpraz bölümlerdede gözükebisin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
biraz daha sağ sol üst ve akt bölüme yaaştır soslar domatesin üzerinde gözükmüyor ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
domatesin sağ sol üst ve alt noktalarında gözüksün bu sos ve daha kırmızı hale getir ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
domatese her tıklamada ekstra olaarak etrafta2 saniyeliğine domates suyu gözüksün ↪💡 Consider importing and using the following plugins: @upit/tween.v1
/**** * Plugins ****/ var storage = LK.import("@upit/storage.v1"); var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Employee = Container.expand(function (name, cost, income) { var self = Container.call(this); self.name = name; self.cost = cost; self.income = income; self.hired = false; self.hiredCount = 0; self.maxCount = 5; // Initialize count for this employee type if not exists if (!employeeTypeCounts[name]) { employeeTypeCounts[name] = 0; } var nameText = new Text2(name, { size: 60, fill: 0x000000 }); nameText.anchor.set(0.5, 0.5); nameText.x = 0; nameText.y = -40; self.addChild(nameText); var incomeText = new Text2('+$' + income + '/sec', { size: 50, fill: 0x4CAF50 }); incomeText.anchor.set(0.5, 0.5); incomeText.x = 0; incomeText.y = 0; self.addChild(incomeText); var costText = new Text2('Cost: $' + cost, { size: 50, fill: 0x666666 }); costText.anchor.set(0.5, 0.5); costText.x = 0; costText.y = 40; self.addChild(costText); self.hireBtn = self.attachAsset('hireButton', { anchorX: 0.5, anchorY: 0.5, x: 0, y: 100, scaleX: 2, scaleY: 2 }); self.statusText = new Text2('HIRE (0/' + self.maxCount + ')', { size: 50, fill: 0xFFFFFF }); self.statusText.anchor.set(0.5, 0.5); self.statusText.x = 0; self.statusText.y = 100; self.addChild(self.statusText); self.hireBtn.down = function (x, y, obj) { if (employeeTypeCounts[self.name] < self.maxCount && money >= self.cost) { money -= self.cost; employeeTypeCounts[self.name]++; self.hiredCount = employeeTypeCounts[self.name]; passiveIncome += self.income; totalEmployeesHired++; self.statusText.setText('HIRED (' + self.hiredCount + '/' + self.maxCount + ')'); if (employeeTypeCounts[self.name] >= self.maxCount) { self.hireBtn.tint = 0x888888; } updateMoneyDisplay(); LK.getSound('purchase').play(); } }; return self; }); var FarmItem = Container.expand(function (name, buyPrice, sellPrice, color) { var self = Container.call(this); self.name = name; self.buyPrice = buyPrice; self.sellPrice = sellPrice; self.quantity = 0; var icon = self.attachAsset('itemIcon', { anchorX: 0.5, anchorY: 0.5 }); icon.tint = color; var nameText = new Text2(name, { size: 55, fill: 0x000000 }); nameText.anchor.set(0.5, 0.5); nameText.x = 0; nameText.y = 100; self.addChild(nameText); var priceText = new Text2('B:$' + buyPrice + ' S:$' + sellPrice, { size: 45, fill: 0x666666 }); priceText.anchor.set(0.5, 0.5); priceText.x = 0; priceText.y = 140; self.addChild(priceText); self.quantityText = new Text2('Own: 0', { size: 50, fill: 0x333333 }); self.quantityText.anchor.set(0.5, 0.5); self.quantityText.x = 0; self.quantityText.y = 180; self.addChild(self.quantityText); var buyBtn = self.attachAsset('buyButton', { anchorX: 0.5, anchorY: 0.5, x: -102, y: 250, scaleX: 2, scaleY: 2 }); var sellBtn = self.attachAsset('sellButton', { anchorX: 0.5, anchorY: 0.5, x: 102, y: 250, scaleX: 2, scaleY: 2 }); var buy5Btn = self.attachAsset('buyButton', { anchorX: 0.5, anchorY: 0.5, x: -102, y: 354, scaleX: 2, scaleY: 2 }); var sell5Btn = self.attachAsset('sellButton', { anchorX: 0.5, anchorY: 0.5, x: 102, y: 354, scaleX: 2, scaleY: 2 }); var buyText = new Text2('BUY', { size: 45, fill: 0xFFFFFF }); buyText.anchor.set(0.5, 0.5); buyText.x = -102; buyText.y = 250; self.addChild(buyText); var sellText = new Text2('SELL', { size: 45, fill: 0xFFFFFF }); sellText.anchor.set(0.5, 0.5); sellText.x = 102; sellText.y = 250; self.addChild(sellText); var buy5Text = new Text2('BUY x5', { size: 40, fill: 0xFFFFFF }); buy5Text.anchor.set(0.5, 0.5); buy5Text.x = -102; buy5Text.y = 354; self.addChild(buy5Text); var sell5Text = new Text2('SELL x5', { size: 40, fill: 0xFFFFFF }); sell5Text.anchor.set(0.5, 0.5); sell5Text.x = 102; sell5Text.y = 354; self.addChild(sell5Text); buyBtn.down = function (x, y, obj) { if (money >= self.buyPrice) { money -= self.buyPrice; self.quantity++; totalItemsBought++; self.quantityText.setText('Own: ' + self.quantity); updateMoneyDisplay(); LK.getSound('purchase').play(); } }; sellBtn.down = function (x, y, obj) { if (self.quantity > 0) { money += self.sellPrice; self.quantity--; self.quantityText.setText('Own: ' + self.quantity); updateMoneyDisplay(); LK.getSound('purchase').play(); } }; buy5Btn.down = function (x, y, obj) { var totalCost = self.buyPrice * 5; if (money >= totalCost) { money -= totalCost; self.quantity += 5; totalItemsBought += 5; self.quantityText.setText('Own: ' + self.quantity); updateMoneyDisplay(); LK.getSound('purchase').play(); } }; sell5Btn.down = function (x, y, obj) { if (self.quantity >= 5) { money += self.sellPrice * 5; self.quantity -= 5; self.quantityText.setText('Own: ' + self.quantity); updateMoneyDisplay(); LK.getSound('purchase').play(); } }; return self; }); var Task = Container.expand(function (title, description, target, reward, type) { var self = Container.call(this); self.title = title; self.description = description; self.target = target; self.reward = reward; self.type = type; // 'money', 'clicks', 'items', 'employees' self.progress = 0; self.completed = false; // Task background - 3x larger var taskBg = self.attachAsset('taskButtonBg', { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0 }); var titleText = new Text2(title, { size: 150, fill: 0x000000 }); titleText.anchor.set(0.5, 0.5); titleText.x = 0; titleText.y = -120; self.addChild(titleText); var descText = new Text2(description, { size: 105, fill: 0x333333 }); descText.anchor.set(0.5, 0.5); descText.x = 0; descText.y = -30; self.addChild(descText); self.progressText = new Text2('0/' + target, { size: 120, fill: 0x666666 }); self.progressText.anchor.set(0.5, 0.5); self.progressText.x = 0; self.progressText.y = 60; self.addChild(self.progressText); var rewardText = new Text2('Reward: $' + reward, { size: 105, fill: 0x4CAF50 }); rewardText.anchor.set(0.5, 0.5); rewardText.x = 0; rewardText.y = 150; self.addChild(rewardText); self.updateProgress = function (newProgress) { self.progress = Math.min(newProgress, self.target); self.progressText.setText(self.progress + '/' + self.target); if (self.progress >= self.target && !self.completed) { self.completed = true; money += self.reward; updateMoneyDisplay(); taskBg.tint = 0x4CAF50; titleText.setText(title + ' - COMPLETED!'); LK.getSound('purchase').play(); } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xE8F5E8 }); /**** * Game Code ****/ var money = storage.money || 0; var passiveIncome = storage.passiveIncome || 0; var musicEnabled = storage.musicEnabled !== undefined ? storage.musicEnabled : true; // Default music enabled var currentScreen = 'menu'; // Start with menu screen var gameStarted = false; // Start menu music if music is enabled if (musicEnabled) { LK.playMusic('menuMusic'); } var farmItems = []; var employees = []; var totalClicks = 0; var totalMoneyEarned = 0; var totalItemsBought = 0; var totalEmployeesHired = 0; var employeeTypeCounts = {}; // Track count for each employee type function updateMoneyDisplay() { moneyText.setText('$' + money); storage.money = money; storage.passiveIncome = passiveIncome; } // Main Menu Elements var menuContainer = new Container(); game.addChild(menuContainer); // Game title - normal text var gameTitle = new Text2('MANAV TİME!', { size: 120, fill: 0x2E7D32 }); gameTitle.anchor.set(0.5, 0.5); gameTitle.x = 1024; gameTitle.y = 600; menuContainer.addChild(gameTitle); // Start button var startBtn = menuContainer.addChild(LK.getAsset('menuButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1200 })); var startBtnText = new Text2('START', { size: 70, fill: 0xFFFFFF }); startBtnText.anchor.set(0.5, 0.5); startBtnText.x = 1024; startBtnText.y = 1200; menuContainer.addChild(startBtnText); // Options button var optionsBtn = menuContainer.addChild(LK.getAsset('menuButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1350 })); var optionsBtnText = new Text2('OPTIONS', { size: 70, fill: 0xFFFFFF }); optionsBtnText.anchor.set(0.5, 0.5); optionsBtnText.x = 1024; optionsBtnText.y = 1350; menuContainer.addChild(optionsBtnText); // How to Play button var howToPlayBtn = menuContainer.addChild(LK.getAsset('menuButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1500 })); var howToPlayBtnText = new Text2('HOW TO PLAY', { size: 70, fill: 0xFFFFFF }); howToPlayBtnText.anchor.set(0.5, 0.5); howToPlayBtnText.x = 1024; howToPlayBtnText.y = 1500; menuContainer.addChild(howToPlayBtnText); // Main screen elements var tomato = game.addChild(LK.getAsset('tomato', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1200 })); tomato.visible = false; // Hide initially var moneyText = new Text2('$' + money, { size: 80, fill: 0x2E7D32 }); moneyText.anchor.set(1, 0); LK.gui.topRight.addChild(moneyText); var passiveText = new Text2('+$' + passiveIncome + '/sec', { size: 50, fill: 0x4CAF50 }); passiveText.anchor.set(1, 0); passiveText.y = 100; LK.gui.topRight.addChild(passiveText); var farmBtn = game.addChild(LK.getAsset('farmButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1800 })); farmBtn.visible = false; // Hide initially var farmBtnText = new Text2('FARM', { size: 70, fill: 0xFFFFFF }); farmBtnText.anchor.set(0.5, 0.5); farmBtnText.x = 1024; farmBtnText.y = 1800; farmBtnText.visible = false; // Hide initially game.addChild(farmBtnText); var employeeBtn = game.addChild(LK.getAsset('employeeButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1920 })); employeeBtn.visible = false; // Hide initially var employeeBtnText = new Text2('EMPLOYEES', { size: 70, fill: 0xFFFFFF }); employeeBtnText.anchor.set(0.5, 0.5); employeeBtnText.x = 1024; employeeBtnText.y = 1920; employeeBtnText.visible = false; // Hide initially game.addChild(employeeBtnText); var tasksBtn = game.addChild(LK.getAsset('tasksButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 2040 })); tasksBtn.visible = false; // Hide initially var tasksBtnText = new Text2('TASKS', { size: 70, fill: 0xFFFFFF }); tasksBtnText.anchor.set(0.5, 0.5); tasksBtnText.x = 1024; tasksBtnText.y = 2040; tasksBtnText.visible = false; // Hide initially game.addChild(tasksBtnText); // Farm screen elements var farmContainer = new Container(); farmContainer.visible = false; game.addChild(farmContainer); var farmTitle = new Text2('FARM MARKET', { size: 70, fill: 0x2E7D32 }); farmTitle.anchor.set(0.5, 0.5); farmTitle.x = 1024; farmTitle.y = 200; farmContainer.addChild(farmTitle); // Create farm items var apple = new FarmItem('Apple', 5, 8, 0xff0000); apple.x = 400; apple.y = 500; farmContainer.addChild(apple); farmItems.push(apple); var banana = new FarmItem('Banana', 3, 5, 0xffff00); banana.x = 1024; banana.y = 500; farmContainer.addChild(banana); farmItems.push(banana); var carrot = new FarmItem('Carrot', 7, 12, 0xff8800); carrot.x = 1648; carrot.y = 500; farmContainer.addChild(carrot); farmItems.push(carrot); var lettuce = new FarmItem('Lettuce', 4, 7, 0x00ff00); lettuce.x = 400; lettuce.y = 900; farmContainer.addChild(lettuce); farmItems.push(lettuce); var potato = new FarmItem('Potato', 6, 10, 0x8b4513); potato.x = 1024; potato.y = 900; farmContainer.addChild(potato); farmItems.push(potato); var corn = new FarmItem('Corn', 8, 15, 0xffd700); corn.x = 1648; corn.y = 900; farmContainer.addChild(corn); farmItems.push(corn); var farmBackBtn = farmContainer.addChild(LK.getAsset('backButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1400 })); var farmBackText = new Text2('BACK', { size: 60, fill: 0xFFFFFF }); farmBackText.anchor.set(0.5, 0.5); farmBackText.x = 1024; farmBackText.y = 1400; farmContainer.addChild(farmBackText); // Employee screen elements var employeeContainer = new Container(); employeeContainer.visible = false; game.addChild(employeeContainer); var employeeTitle = new Text2('HIRE EMPLOYEES', { size: 70, fill: 0x2E7D32 }); employeeTitle.anchor.set(0.5, 0.5); employeeTitle.x = 1024; employeeTitle.y = 200; employeeContainer.addChild(employeeTitle); // Create employees var farmWorker = new Employee('Farm Worker', 50, 1); farmWorker.x = 512; farmWorker.y = 500; employeeContainer.addChild(farmWorker); employees.push(farmWorker); var supervisor = new Employee('Supervisor', 200, 5); supervisor.x = 1536; supervisor.y = 500; employeeContainer.addChild(supervisor); employees.push(supervisor); var manager = new Employee('Manager', 1000, 25); manager.x = 512; manager.y = 800; employeeContainer.addChild(manager); employees.push(manager); var ceo = new Employee('CEO', 5000, 100); ceo.x = 1536; ceo.y = 800; employeeContainer.addChild(ceo); employees.push(ceo); var employeeBackBtn = employeeContainer.addChild(LK.getAsset('backButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1200 })); var employeeBackText = new Text2('BACK', { size: 60, fill: 0xFFFFFF }); employeeBackText.anchor.set(0.5, 0.5); employeeBackText.x = 1024; employeeBackText.y = 1200; employeeContainer.addChild(employeeBackText); // Tasks screen elements var tasksContainer = new Container(); tasksContainer.visible = false; game.addChild(tasksContainer); var tasksTitle = new Text2('TASKS & MISSIONS', { size: 70, fill: 0x2E7D32 }); tasksTitle.anchor.set(0.5, 0.5); tasksTitle.x = 1024; tasksTitle.y = 200; tasksContainer.addChild(tasksTitle); // Create tasks var tasks = []; var clickTask = new Task('First Clicks', 'Click tomato 10 times', 10, 20, 'clicks'); clickTask.x = 1024; clickTask.y = 450; tasksContainer.addChild(clickTask); tasks.push(clickTask); var moneyTask = new Task('Money Maker', 'Earn $100 total', 100, 50, 'money'); moneyTask.x = 1024; moneyTask.y = 850; tasksContainer.addChild(moneyTask); tasks.push(moneyTask); var farmTask = new Task('Farmer', 'Buy 5 items from farm', 5, 100, 'items'); farmTask.x = 1024; farmTask.y = 1250; tasksContainer.addChild(farmTask); tasks.push(farmTask); var employeeTask = new Task('Boss', 'Hire your first employee', 1, 150, 'employees'); employeeTask.x = 1024; employeeTask.y = 1650; tasksContainer.addChild(employeeTask); tasks.push(employeeTask); var bigMoneyTask = new Task('Rich', 'Earn $1000 total', 1000, 500, 'money'); bigMoneyTask.x = 1024; bigMoneyTask.y = 2050; tasksContainer.addChild(bigMoneyTask); tasks.push(bigMoneyTask); var tasksBackBtn = tasksContainer.addChild(LK.getAsset('backButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 2450 })); var tasksBackText = new Text2('BACK', { size: 60, fill: 0xFFFFFF }); tasksBackText.anchor.set(0.5, 0.5); tasksBackText.x = 1024; tasksBackText.y = 2450; tasksContainer.addChild(tasksBackText); // Options screen elements var optionsContainer = new Container(); optionsContainer.visible = false; game.addChild(optionsContainer); var optionsTitle = new Text2('OPTIONS', { size: 70, fill: 0x2E7D32 }); optionsTitle.anchor.set(0.5, 0.5); optionsTitle.x = 1024; optionsTitle.y = 400; optionsContainer.addChild(optionsTitle); // Music toggle button var musicToggleBtn = optionsContainer.addChild(LK.getAsset('menuButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 800 })); var musicToggleText = new Text2(musicEnabled ? 'MUSIC: ON' : 'MUSIC: OFF', { size: 60, fill: 0xFFFFFF }); musicToggleText.anchor.set(0.5, 0.5); musicToggleText.x = 1024; musicToggleText.y = 800; optionsContainer.addChild(musicToggleText); // Options back button var optionsBackBtn = optionsContainer.addChild(LK.getAsset('backButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1200 })); var optionsBackText = new Text2('BACK', { size: 60, fill: 0xFFFFFF }); optionsBackText.anchor.set(0.5, 0.5); optionsBackText.x = 1024; optionsBackText.y = 1200; optionsContainer.addChild(optionsBackText); // Menu Event handlers startBtn.down = function (x, y, obj) { currentScreen = 'main'; gameStarted = true; menuContainer.visible = false; tomato.visible = true; farmBtn.visible = true; farmBtnText.visible = true; employeeBtn.visible = true; employeeBtnText.visible = true; tasksBtn.visible = true; tasksBtnText.visible = true; if (musicEnabled) { LK.playMusic('gameMusic'); } LK.getSound('click').play(); }; optionsBtn.down = function (x, y, obj) { currentScreen = 'options'; menuContainer.visible = false; optionsContainer.visible = true; LK.getSound('click').play(); }; howToPlayBtn.down = function (x, y, obj) { // How to play functionality can be added later LK.getSound('click').play(); }; // Options screen event handlers musicToggleBtn.down = function (x, y, obj) { musicEnabled = !musicEnabled; musicToggleText.setText(musicEnabled ? 'MUSIC: ON' : 'MUSIC: OFF'); storage.musicEnabled = musicEnabled; if (musicEnabled) { // Start appropriate music based on current screen if (currentScreen === 'menu' || currentScreen === 'options') { LK.playMusic('menuMusic'); } else { LK.playMusic('gameMusic'); } } else { LK.stopMusic(); } LK.getSound('click').play(); }; optionsBackBtn.down = function (x, y, obj) { currentScreen = 'menu'; optionsContainer.visible = false; menuContainer.visible = true; if (musicEnabled) { LK.playMusic('menuMusic'); } LK.getSound('click').play(); }; // Event handlers tomato.down = function (x, y, obj) { money += 1; totalClicks++; totalMoneyEarned++; updateMoneyDisplay(); LK.getSound('click').play(); // Animate tomato scale - grow then shrink back tween(tomato, { scaleX: 1.2, scaleY: 1.2 }, { duration: 150, easing: tween.easeOut, onFinish: function onFinish() { tween(tomato, { scaleX: 1.0, scaleY: 1.0 }, { duration: 150, easing: tween.easeOut }); } }); // Create tomato juice particles at right, left, top, bottom and diagonal points var positions = [{ angle: 0, name: 'right' }, // Right { angle: Math.PI, name: 'left' }, // Left { angle: -Math.PI / 2, name: 'top' }, // Top { angle: Math.PI / 2, name: 'bottom' }, // Bottom { angle: -Math.PI / 4, name: 'top-right' }, // Top-right diagonal { angle: -3 * Math.PI / 4, name: 'top-left' }, // Top-left diagonal { angle: Math.PI / 4, name: 'bottom-right' }, // Bottom-right diagonal { angle: 3 * Math.PI / 4, name: 'bottom-left' } // Bottom-left diagonal ]; for (var i = 0; i < positions.length; i++) { var angle = positions[i].angle; var startDistance = 300; // Start particles further from tomato center var startX = tomato.x + Math.cos(angle) * startDistance; var startY = tomato.y + Math.sin(angle) * startDistance; var juice = game.addChild(LK.getAsset('tomatoJuice', { anchorX: 0.5, anchorY: 0.5, x: startX, y: startY })); var endDistance = 450; // End particles even further away var targetX = tomato.x + Math.cos(angle) * endDistance; var targetY = tomato.y + Math.sin(angle) * endDistance; tween(juice, { x: targetX, y: targetY, alpha: 0, scaleX: 0.5, scaleY: 0.5 }, { duration: 2000, easing: tween.easeOut, onFinish: function onFinish() { juice.destroy(); } }); } }; farmBtn.down = function (x, y, obj) { if (money >= 10) { currentScreen = 'farm'; tomato.visible = false; farmBtn.visible = false; farmBtnText.visible = false; employeeBtn.visible = false; employeeBtnText.visible = false; tasksBtn.visible = false; tasksBtnText.visible = false; farmContainer.visible = true; } }; employeeBtn.down = function (x, y, obj) { if (money >= 25) { currentScreen = 'employee'; tomato.visible = false; farmBtn.visible = false; farmBtnText.visible = false; employeeBtn.visible = false; employeeBtnText.visible = false; tasksBtn.visible = false; tasksBtnText.visible = false; employeeContainer.visible = true; } }; farmBackBtn.down = function (x, y, obj) { currentScreen = 'main'; tomato.visible = true; farmBtn.visible = true; farmBtnText.visible = true; employeeBtn.visible = true; employeeBtnText.visible = true; tasksBtn.visible = true; tasksBtnText.visible = true; farmContainer.visible = false; }; employeeBackBtn.down = function (x, y, obj) { currentScreen = 'main'; tomato.visible = true; farmBtn.visible = true; farmBtnText.visible = true; employeeBtn.visible = true; employeeBtnText.visible = true; tasksBtn.visible = true; tasksBtnText.visible = true; employeeContainer.visible = false; }; tasksBtn.down = function (x, y, obj) { currentScreen = 'tasks'; tomato.visible = false; farmBtn.visible = false; farmBtnText.visible = false; employeeBtn.visible = false; employeeBtnText.visible = false; tasksBtn.visible = false; tasksBtnText.visible = false; tasksContainer.visible = true; }; tasksBackBtn.down = function (x, y, obj) { currentScreen = 'main'; tomato.visible = true; farmBtn.visible = true; farmBtnText.visible = true; employeeBtn.visible = true; employeeBtnText.visible = true; tasksBtn.visible = true; tasksBtnText.visible = true; tasksContainer.visible = false; }; // Passive income timer var passiveTimer = LK.setInterval(function () { if (passiveIncome > 0 && gameStarted && currentScreen !== 'menu') { money += passiveIncome; totalMoneyEarned += passiveIncome; updateMoneyDisplay(); } }, 1000); game.update = function () { // Only update game logic if game has started if (gameStarted && currentScreen !== 'menu') { // Update button visibility based on money if (money >= 10) { farmBtn.alpha = 1; farmBtnText.alpha = 1; } else { farmBtn.alpha = 0.5; farmBtnText.alpha = 0.5; } if (money >= 25) { employeeBtn.alpha = 1; employeeBtnText.alpha = 1; } else { employeeBtn.alpha = 0.5; employeeBtnText.alpha = 0.5; } // Update passive income display passiveText.setText('+$' + passiveIncome + '/sec'); // Update task progress if (tasks.length > 0) { tasks[0].updateProgress(totalClicks); // Click task tasks[1].updateProgress(totalMoneyEarned); // Money task tasks[2].updateProgress(totalItemsBought); // Farm items task tasks[3].updateProgress(totalEmployeesHired); // Employee task tasks[4].updateProgress(totalMoneyEarned); // Big money task } } };
===================================================================
--- original.js
+++ change.js
@@ -113,68 +113,68 @@
self.addChild(self.quantityText);
var buyBtn = self.attachAsset('buyButton', {
anchorX: 0.5,
anchorY: 0.5,
- x: -100,
+ x: -102,
y: 250,
scaleX: 2,
scaleY: 2
});
var sellBtn = self.attachAsset('sellButton', {
anchorX: 0.5,
anchorY: 0.5,
- x: 100,
+ x: 102,
y: 250,
scaleX: 2,
scaleY: 2
});
var buy5Btn = self.attachAsset('buyButton', {
anchorX: 0.5,
anchorY: 0.5,
- x: -100,
- y: 350,
+ x: -102,
+ y: 354,
scaleX: 2,
scaleY: 2
});
var sell5Btn = self.attachAsset('sellButton', {
anchorX: 0.5,
anchorY: 0.5,
- x: 100,
- y: 350,
+ x: 102,
+ y: 354,
scaleX: 2,
scaleY: 2
});
var buyText = new Text2('BUY', {
size: 45,
fill: 0xFFFFFF
});
buyText.anchor.set(0.5, 0.5);
- buyText.x = -100;
+ buyText.x = -102;
buyText.y = 250;
self.addChild(buyText);
var sellText = new Text2('SELL', {
size: 45,
fill: 0xFFFFFF
});
sellText.anchor.set(0.5, 0.5);
- sellText.x = 100;
+ sellText.x = 102;
sellText.y = 250;
self.addChild(sellText);
var buy5Text = new Text2('BUY x5', {
size: 40,
fill: 0xFFFFFF
});
buy5Text.anchor.set(0.5, 0.5);
- buy5Text.x = -100;
- buy5Text.y = 350;
+ buy5Text.x = -102;
+ buy5Text.y = 354;
self.addChild(buy5Text);
var sell5Text = new Text2('SELL x5', {
size: 40,
fill: 0xFFFFFF
});
sell5Text.anchor.set(0.5, 0.5);
- sell5Text.x = 100;
- sell5Text.y = 350;
+ sell5Text.x = 102;
+ sell5Text.y = 354;
self.addChild(sell5Text);
buyBtn.down = function (x, y, obj) {
if (money >= self.buyPrice) {
money -= self.buyPrice;