User prompt
her levelde bir oncekı levelın ıkı katı para gelsin 1 2 4 8 16 etc.
User prompt
ust bolumunde yer alan boşluğa yaz
User prompt
domatesin ustune her tıklamada kac para geldıgını yaz
User prompt
yanda yazan level ? yazısını kaç para olduğu ile değiştir
User prompt
seviyelerin ne kadar olduğunu yandaki boşluğa yaz
User prompt
skıll butonunu maksimum 100 level yap
User prompt
bonus butonunu oyundan sil
User prompt
oyun ekranına skıll butonu ekle para karşılıgında tıklama başına alınan para artıcak
User prompt
fiyat listesi yazılarının boyutunu artır
User prompt
butonun içindei yazıları büyüt
User prompt
fiyat listesi için buton yap
User prompt
meyve sebzeler icin fiyat listesi yap
User prompt
elde edilen geliri 100 bin
User prompt
bonus butonundan elde edilen geliri azalt
User prompt
oyun ekranındaki farm employees tasks butonları arasındaki boşluğu artır
User prompt
bu butona basılınca sayfa açılıcak ve sadece tek bir kez 1 miyon alınabilicek ayrıca oyunun üst kısmına kronometre koy ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
oyunda birinci üçüncü onuncu ve otuzuncu dakikalarda sol üst köşede 3 sniyeliğine ortaya çıkan bir buton oluştur bu buton sadece oyun ekranında gözükücek ve tıklandığı zaman 1 miyon para kazanılıcak ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
bu ekrana tıklayınca gelen parayı kaldır
User prompt
butona tıklayınca birekran açılsın
User prompt
bonus butonunu tasks butonunun altına yerleştir
User prompt
oyun ekranına 10 dakikada bir aktif olucak bir buton ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
how to play kısmına basıldıgında oyunun nasıl oynandığını anlatsın
User prompt
ana ekrandaki butonları büyüt
User prompt
ben farm market ve hire employees içindeki butonları kastetmiştim
User prompt
bütün butonları kaldır ve daha büyük boyutlarda tüm ekran kapsanacak şekilde yeniden tasarla
/**** * 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: 90, 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: 80, 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: 80, 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 }); self.statusText = new Text2('HIRE (0/' + self.maxCount + ')', { size: 80, 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: 90, 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: 75, 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: 80, fill: 0x333333 }); self.quantityText.anchor.set(0.5, 0.5); self.quantityText.x = 0; self.quantityText.y = 200; self.addChild(self.quantityText); var buyBtn = self.attachAsset('buyButton', { anchorX: 0.5, anchorY: 0.5, x: -100, y: 270 }); var sellBtn = self.attachAsset('sellButton', { anchorX: 0.5, anchorY: 0.5, x: 100, y: 270 }); var buyText = new Text2('BUY', { size: 80, fill: 0xFFFFFF }); buyText.anchor.set(0.5, 0.5); buyText.x = -100; buyText.y = 270; self.addChild(buyText); var sellText = new Text2('SELL', { size: 80, fill: 0xFFFFFF }); sellText.anchor.set(0.5, 0.5); sellText.x = 100; sellText.y = 270; self.addChild(sellText); 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(); } }; 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 var specialBonusButton = null; var lastBonusTime = 0; var bonusButtonActive = false; var timingBonusButton = null; var gameStartTime = 0; var timingBonusTimes = [60000, 180000, 600000, 1800000]; // 1min, 3min, 10min, 30min in milliseconds var timingBonusActive = false; var timingBonusIndex = 0; // Skill system variables var clickPower = 1; // Money earned per click var skillUpgradeCost = 100; // Starting cost for skill upgrade var skillLevel = 1; // Current skill level // Bonus screen elements var bonusContainer = new Container(); bonusContainer.visible = false; game.addChild(bonusContainer); // Timing bonus screen container var timingBonusContainer = new Container(); timingBonusContainer.visible = false; game.addChild(timingBonusContainer); // Track if timing bonus has been claimed var timingBonusClaimed = false; 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: 85, 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: 85, 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: 85, 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); // Chronometer display var chronometerText = new Text2('00:00', { size: 60, fill: 0x2E7D32 }); chronometerText.anchor.set(0.5, 0); chronometerText.x = 0; chronometerText.y = 0; LK.gui.top.addChild(chronometerText); var farmBtn = game.addChild(LK.getAsset('farmButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1750 })); farmBtn.visible = false; // Hide initially var farmBtnText = new Text2('FARM', { size: 100, fill: 0xFFFFFF }); farmBtnText.anchor.set(0.5, 0.5); farmBtnText.x = 1024; farmBtnText.y = 1750; farmBtnText.visible = false; // Hide initially game.addChild(farmBtnText); var employeeBtn = game.addChild(LK.getAsset('employeeButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1950 })); employeeBtn.visible = false; // Hide initially var employeeBtnText = new Text2('EMPLOYEES', { size: 100, fill: 0xFFFFFF }); employeeBtnText.anchor.set(0.5, 0.5); employeeBtnText.x = 1024; employeeBtnText.y = 1950; employeeBtnText.visible = false; // Hide initially game.addChild(employeeBtnText); var tasksBtn = game.addChild(LK.getAsset('tasksButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 2150 })); tasksBtn.visible = false; // Hide initially var tasksBtnText = new Text2('TASKS', { size: 100, fill: 0xFFFFFF }); tasksBtnText.anchor.set(0.5, 0.5); tasksBtnText.x = 1024; tasksBtnText.y = 2150; tasksBtnText.visible = false; // Hide initially game.addChild(tasksBtnText); // Special bonus button (appears every 10 minutes) specialBonusButton = game.addChild(LK.getAsset('specialBonus', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 2350 })); specialBonusButton.visible = false; // Hide initially var specialBonusText = new Text2('BONUS!', { size: 120, fill: 0xFFFFFF }); specialBonusText.anchor.set(0.5, 0.5); specialBonusText.x = 1024; specialBonusText.y = 2350; specialBonusText.visible = false; // Hide initially game.addChild(specialBonusText); // Timing bonus button (appears at specific times in top-left) timingBonusButton = game.addChild(LK.getAsset('timingBonus', { anchorX: 0, anchorY: 0, x: 150, y: 150 })); timingBonusButton.visible = false; // Hide initially var timingBonusText = new Text2('1M$!', { size: 90, fill: 0x000000 }); timingBonusText.anchor.set(0.5, 0.5); timingBonusText.x = 250; timingBonusText.y = 200; timingBonusText.visible = false; // Hide initially game.addChild(timingBonusText); // Skill button var skillBtn = game.addChild(LK.getAsset('skillButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 2350 })); skillBtn.visible = false; // Hide initially var skillBtnText = new Text2('SKILL LV.' + skillLevel + ' - UPGRADE $' + skillUpgradeCost, { size: 80, fill: 0xFFFFFF }); skillBtnText.anchor.set(0.5, 0.5); skillBtnText.x = 1024; skillBtnText.y = 2350; skillBtnText.visible = false; // Hide initially game.addChild(skillBtnText); // 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); // Price list button in farm screen var farmPriceListBtn = farmContainer.addChild(LK.getAsset('menuButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1300 })); var farmPriceListBtnText = new Text2('PRICE LIST', { size: 60, fill: 0xFFFFFF }); farmPriceListBtnText.anchor.set(0.5, 0.5); farmPriceListBtnText.x = 1024; farmPriceListBtnText.y = 1300; farmContainer.addChild(farmPriceListBtnText); var farmBackBtn = farmContainer.addChild(LK.getAsset('backButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1450 })); var farmBackText = new Text2('BACK', { size: 60, fill: 0xFFFFFF }); farmBackText.anchor.set(0.5, 0.5); farmBackText.x = 1024; farmBackText.y = 1450; 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); // How to Play screen elements var howToPlayContainer = new Container(); howToPlayContainer.visible = false; game.addChild(howToPlayContainer); var howToPlayTitle = new Text2('HOW TO PLAY', { size: 70, fill: 0x2E7D32 }); howToPlayTitle.anchor.set(0.5, 0.5); howToPlayTitle.x = 1024; howToPlayTitle.y = 300; howToPlayContainer.addChild(howToPlayTitle); var instruction1 = new Text2('🍅 Click the tomato to earn money', { size: 55, fill: 0x333333 }); instruction1.anchor.set(0.5, 0.5); instruction1.x = 1024; instruction1.y = 500; howToPlayContainer.addChild(instruction1); var instruction2 = new Text2('🛒 Use FARM to buy and sell fruits/vegetables', { size: 55, fill: 0x333333 }); instruction2.anchor.set(0.5, 0.5); instruction2.x = 1024; instruction2.y = 600; howToPlayContainer.addChild(instruction2); var instruction3 = new Text2('👥 Hire EMPLOYEES for passive income', { size: 55, fill: 0x333333 }); instruction3.anchor.set(0.5, 0.5); instruction3.x = 1024; instruction3.y = 700; howToPlayContainer.addChild(instruction3); var instruction4 = new Text2('📋 Complete TASKS for bonus rewards', { size: 55, fill: 0x333333 }); instruction4.anchor.set(0.5, 0.5); instruction4.x = 1024; instruction4.y = 800; howToPlayContainer.addChild(instruction4); var instruction5 = new Text2('💰 Farm requires $10, Employees require $25', { size: 50, fill: 0x666666 }); instruction5.anchor.set(0.5, 0.5); instruction5.x = 1024; instruction5.y = 950; howToPlayContainer.addChild(instruction5); var instruction6 = new Text2('🎯 Goal: Build your farming empire!', { size: 55, fill: 0x4CAF50 }); instruction6.anchor.set(0.5, 0.5); instruction6.x = 1024; instruction6.y = 1100; howToPlayContainer.addChild(instruction6); // Price List button in How to Play screen var priceListBtn = howToPlayContainer.addChild(LK.getAsset('menuButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1200 })); var priceListBtnText = new Text2('PRICE LIST', { size: 60, fill: 0xFFFFFF }); priceListBtnText.anchor.set(0.5, 0.5); priceListBtnText.x = 1024; priceListBtnText.y = 1200; howToPlayContainer.addChild(priceListBtnText); // How to Play back button var howToPlayBackBtn = howToPlayContainer.addChild(LK.getAsset('backButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1350 })); var howToPlayBackText = new Text2('BACK', { size: 60, fill: 0xFFFFFF }); howToPlayBackText.anchor.set(0.5, 0.5); howToPlayBackText.x = 1024; howToPlayBackText.y = 1350; howToPlayContainer.addChild(howToPlayBackText); // Price List screen elements var priceListContainer = new Container(); priceListContainer.visible = false; game.addChild(priceListContainer); var priceListTitle = new Text2('PRICE LIST - FRUITS & VEGETABLES', { size: 80, fill: 0x2E7D32 }); priceListTitle.anchor.set(0.5, 0.5); priceListTitle.x = 1024; priceListTitle.y = 250; priceListContainer.addChild(priceListTitle); // Fruits section header var fruitsHeader = new Text2('FRUITS', { size: 70, fill: 0xff6b6b }); fruitsHeader.anchor.set(0.5, 0.5); fruitsHeader.x = 512; fruitsHeader.y = 400; priceListContainer.addChild(fruitsHeader); // Vegetables section header var vegetablesHeader = new Text2('VEGETABLES', { size: 70, fill: 0x4ecdc4 }); vegetablesHeader.anchor.set(0.5, 0.5); vegetablesHeader.x = 1536; vegetablesHeader.y = 400; priceListContainer.addChild(vegetablesHeader); // Apple price info var applePrice = new Text2('Apple\nBuy: $5 Sell: $8\nProfit: $3', { size: 60, fill: 0x333333 }); applePrice.anchor.set(0.5, 0.5); applePrice.x = 512; applePrice.y = 550; priceListContainer.addChild(applePrice); // Banana price info var bananaPrice = new Text2('Banana\nBuy: $3 Sell: $5\nProfit: $2', { size: 60, fill: 0x333333 }); bananaPrice.anchor.set(0.5, 0.5); bananaPrice.x = 512; bananaPrice.y = 750; priceListContainer.addChild(bananaPrice); // Carrot price info var carrotPrice = new Text2('Carrot\nBuy: $7 Sell: $12\nProfit: $5', { size: 60, fill: 0x333333 }); carrotPrice.anchor.set(0.5, 0.5); carrotPrice.x = 1536; carrotPrice.y = 550; priceListContainer.addChild(carrotPrice); // Lettuce price info var lettucePrice = new Text2('Lettuce\nBuy: $4 Sell: $7\nProfit: $3', { size: 60, fill: 0x333333 }); lettucePrice.anchor.set(0.5, 0.5); lettucePrice.x = 1536; lettucePrice.y = 750; priceListContainer.addChild(lettucePrice); // Potato price info var potatoPrice = new Text2('Potato\nBuy: $6 Sell: $10\nProfit: $4', { size: 60, fill: 0x333333 }); potatoPrice.anchor.set(0.5, 0.5); potatoPrice.x = 512; potatoPrice.y = 950; priceListContainer.addChild(potatoPrice); // Corn price info var cornPrice = new Text2('Corn\nBuy: $8 Sell: $15\nProfit: $7', { size: 60, fill: 0x333333 }); cornPrice.anchor.set(0.5, 0.5); cornPrice.x = 1536; cornPrice.y = 950; priceListContainer.addChild(cornPrice); // Best profit tip var profitTip = new Text2('TIP: Corn has the highest profit margin!', { size: 65, fill: 0x4CAF50 }); profitTip.anchor.set(0.5, 0.5); profitTip.x = 1024; profitTip.y = 1150; priceListContainer.addChild(profitTip); // Price List back button var priceListBackBtn = priceListContainer.addChild(LK.getAsset('backButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1350 })); var priceListBackText = new Text2('BACK', { size: 60, fill: 0xFFFFFF }); priceListBackText.anchor.set(0.5, 0.5); priceListBackText.x = 1024; priceListBackText.y = 1350; priceListContainer.addChild(priceListBackText); // 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; gameStartTime = Date.now(); // Initialize game start time timingBonusIndex = 0; // Reset timing bonus index timingBonusClaimed = false; // Reset timing bonus claimed flag menuContainer.visible = false; tomato.visible = true; farmBtn.visible = true; farmBtnText.visible = true; employeeBtn.visible = true; employeeBtnText.visible = true; tasksBtn.visible = true; tasksBtnText.visible = true; skillBtn.visible = true; skillBtnText.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) { currentScreen = 'howtoplay'; menuContainer.visible = false; howToPlayContainer.visible = true; 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(); }; // Price List button event handler priceListBtn.down = function (x, y, obj) { currentScreen = 'pricelist'; howToPlayContainer.visible = false; priceListContainer.visible = true; LK.getSound('click').play(); }; // Farm Price List button event handler farmPriceListBtn.down = function (x, y, obj) { currentScreen = 'pricelist'; farmContainer.visible = false; priceListContainer.visible = true; LK.getSound('click').play(); }; // Price List back button event handler priceListBackBtn.down = function (x, y, obj) { if (currentScreen === 'pricelist') { // Check where we came from - if from farm, go back to farm var previousScreen = 'howtoplay'; // default // Check if farm container was visible before if (!howToPlayContainer.visible) { previousScreen = 'farm'; } if (previousScreen === 'farm') { currentScreen = 'farm'; priceListContainer.visible = false; farmContainer.visible = true; } else { currentScreen = 'howtoplay'; priceListContainer.visible = false; howToPlayContainer.visible = true; } LK.getSound('click').play(); } }; howToPlayBackBtn.down = function (x, y, obj) { currentScreen = 'menu'; howToPlayContainer.visible = false; menuContainer.visible = true; if (musicEnabled) { LK.playMusic('menuMusic'); } 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 += clickPower; totalClicks++; totalMoneyEarned += clickPower; 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; specialBonusButton.visible = false; specialBonusText.visible = false; skillBtn.visible = false; skillBtnText.visible = false; farmContainer.visible = true; } }; skillBtn.down = function (x, y, obj) { if (money >= skillUpgradeCost) { money -= skillUpgradeCost; skillLevel++; clickPower++; skillUpgradeCost = Math.floor(skillUpgradeCost * 1.5); // Increase cost by 50% skillBtnText.setText('SKILL LV.' + skillLevel + ' - UPGRADE $' + skillUpgradeCost); updateMoneyDisplay(); LK.getSound('purchase').play(); } }; 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; specialBonusButton.visible = false; specialBonusText.visible = false; skillBtn.visible = false; skillBtnText.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; if (bonusButtonActive) { specialBonusButton.visible = true; specialBonusText.visible = true; } skillBtn.visible = true; skillBtnText.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; if (bonusButtonActive) { specialBonusButton.visible = true; specialBonusText.visible = true; } skillBtn.visible = true; skillBtnText.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; specialBonusButton.visible = false; specialBonusText.visible = false; skillBtn.visible = false; skillBtnText.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; skillBtn.visible = true; skillBtnText.visible = true; tasksContainer.visible = false; }; var bonusTitle = new Text2('SPECIAL BONUS!', { size: 90, fill: 0xff1744 }); bonusTitle.anchor.set(0.5, 0.5); bonusTitle.x = 1024; bonusTitle.y = 400; bonusContainer.addChild(bonusTitle); var bonusDescription = new Text2('Congratulations! You earned a special bonus!', { size: 60, fill: 0x333333 }); bonusDescription.anchor.set(0.5, 0.5); bonusDescription.x = 1024; bonusDescription.y = 600; bonusContainer.addChild(bonusDescription); var bonusAmountText = new Text2('', { size: 80, fill: 0x4CAF50 }); bonusAmountText.anchor.set(0.5, 0.5); bonusAmountText.x = 1024; bonusAmountText.y = 800; bonusContainer.addChild(bonusAmountText); var bonusCloseBtn = bonusContainer.addChild(LK.getAsset('backButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1000 })); var bonusCloseText = new Text2('CLAIM', { size: 60, fill: 0xFFFFFF }); bonusCloseText.anchor.set(0.5, 0.5); bonusCloseText.x = 1024; bonusCloseText.y = 1000; bonusContainer.addChild(bonusCloseText); // Timing bonus screen elements var timingBonusTitle = new Text2('TIME BONUS!', { size: 90, fill: 0xffd700 }); timingBonusTitle.anchor.set(0.5, 0.5); timingBonusTitle.x = 1024; timingBonusTitle.y = 400; timingBonusContainer.addChild(timingBonusTitle); var timingBonusDescription = new Text2('Perfect timing! Claim your 1 million bonus!', { size: 60, fill: 0x333333 }); timingBonusDescription.anchor.set(0.5, 0.5); timingBonusDescription.x = 1024; timingBonusDescription.y = 600; timingBonusContainer.addChild(timingBonusDescription); var timingBonusAmountText = new Text2('Bonus: $1,000,000', { size: 80, fill: 0x4CAF50 }); timingBonusAmountText.anchor.set(0.5, 0.5); timingBonusAmountText.x = 1024; timingBonusAmountText.y = 800; timingBonusContainer.addChild(timingBonusAmountText); var timingBonusClaimBtn = timingBonusContainer.addChild(LK.getAsset('backButton', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1000 })); var timingBonusClaimText = new Text2('CLAIM', { size: 60, fill: 0xFFFFFF }); timingBonusClaimText.anchor.set(0.5, 0.5); timingBonusClaimText.x = 1024; timingBonusClaimText.y = 1000; timingBonusContainer.addChild(timingBonusClaimText); // Special bonus button event handler specialBonusButton.down = function (x, y, obj) { if (bonusButtonActive) { // Calculate bonus reward var bonusAmount = 100000; // Fixed 100,000 reward bonusAmountText.setText('Bonus Amount: $' + bonusAmount); // Show bonus screen currentScreen = 'bonus'; bonusContainer.visible = true; // Hide main screen elements tomato.visible = false; farmBtn.visible = false; farmBtnText.visible = false; employeeBtn.visible = false; employeeBtnText.visible = false; tasksBtn.visible = false; tasksBtnText.visible = false; specialBonusButton.visible = false; specialBonusText.visible = false; skillBtn.visible = false; skillBtnText.visible = false; LK.getSound('click').play(); } }; // Timing bonus button event handler timingBonusButton.down = function (x, y, obj) { if (timingBonusActive && currentScreen === 'main' && !timingBonusClaimed) { // Show timing bonus screen currentScreen = 'timingBonus'; timingBonusContainer.visible = true; // Hide main screen elements tomato.visible = false; farmBtn.visible = false; farmBtnText.visible = false; employeeBtn.visible = false; employeeBtnText.visible = false; tasksBtn.visible = false; tasksBtnText.visible = false; specialBonusButton.visible = false; specialBonusText.visible = false; timingBonusButton.visible = false; timingBonusText.visible = false; skillBtn.visible = false; skillBtnText.visible = false; LK.getSound('click').play(); } }; // Bonus close button event handler bonusCloseBtn.down = function (x, y, obj) { if (currentScreen === 'bonus') { // Add bonus money money += 100000; updateMoneyDisplay(); // Return to main screen currentScreen = 'main'; bonusContainer.visible = false; tomato.visible = true; farmBtn.visible = true; farmBtnText.visible = true; employeeBtn.visible = true; employeeBtnText.visible = true; tasksBtn.visible = true; tasksBtnText.visible = true; skillBtn.visible = true; skillBtnText.visible = true; bonusButtonActive = false; lastBonusTime = Date.now(); // Reset timer LK.getSound('purchase').play(); } }; // Timing bonus claim button event handler timingBonusClaimBtn.down = function (x, y, obj) { if (currentScreen === 'timingBonus' && !timingBonusClaimed) { // Add 1 million money only once money += 1000000; timingBonusClaimed = true; updateMoneyDisplay(); // Return to main screen currentScreen = 'main'; timingBonusContainer.visible = false; tomato.visible = true; farmBtn.visible = true; farmBtnText.visible = true; employeeBtn.visible = true; employeeBtnText.visible = true; tasksBtn.visible = true; tasksBtnText.visible = true; skillBtn.visible = true; skillBtnText.visible = true; timingBonusActive = false; timingBonusIndex++; LK.getSound('purchase').play(); } }; // Passive income timer var passiveTimer = LK.setInterval(function () { if (passiveIncome > 0 && gameStarted && currentScreen !== 'menu') { money += passiveIncome; totalMoneyEarned += passiveIncome; updateMoneyDisplay(); } }, 1000); game.update = function () { // Update chronometer display if (gameStarted) { var currentTime = Date.now(); var elapsedSeconds = Math.floor((currentTime - gameStartTime) / 1000); var minutes = Math.floor(elapsedSeconds / 60); var seconds = elapsedSeconds % 60; var timeString = (minutes < 10 ? '0' : '') + minutes + ':' + (seconds < 10 ? '0' : '') + seconds; chronometerText.setText(timeString); } // 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 } // Special bonus button logic (appears every 10 minutes = 600000ms) var currentTime = Date.now(); if (currentScreen === 'main' && !bonusButtonActive && currentTime - lastBonusTime >= 600000) { bonusButtonActive = true; specialBonusButton.visible = true; specialBonusText.visible = true; specialBonusButton.alpha = 0; specialBonusText.alpha = 0; specialBonusButton.scaleX = 0; specialBonusButton.scaleY = 0; specialBonusText.scaleX = 0; specialBonusText.scaleY = 0; // Animate button appearance tween(specialBonusButton, { alpha: 1, scaleX: 1, scaleY: 1 }, { duration: 800, easing: tween.bounceOut }); tween(specialBonusText, { alpha: 1, scaleX: 1, scaleY: 1 }, { duration: 800, easing: tween.bounceOut }); // Add pulsing animation var _pulseAnimation = function pulseAnimation() { if (bonusButtonActive) { tween(specialBonusButton, { scaleX: 1.1, scaleY: 1.1 }, { duration: 500, easing: tween.easeInOut, onFinish: function onFinish() { if (bonusButtonActive) { tween(specialBonusButton, { scaleX: 1, scaleY: 1 }, { duration: 500, easing: tween.easeInOut, onFinish: _pulseAnimation }); } } }); } }; _pulseAnimation(); } // Timing bonus button logic (appears at 1min, 3min, 10min, 30min for 3 seconds) if (gameStarted && currentScreen === 'main' && timingBonusIndex < timingBonusTimes.length) { var gameElapsed = currentTime - gameStartTime; var nextBonusTime = timingBonusTimes[timingBonusIndex]; if (!timingBonusActive && gameElapsed >= nextBonusTime) { timingBonusActive = true; timingBonusButton.visible = true; timingBonusText.visible = true; timingBonusButton.alpha = 0; timingBonusText.alpha = 0; timingBonusButton.scaleX = 0; timingBonusButton.scaleY = 0; timingBonusText.scaleX = 0; timingBonusText.scaleY = 0; // Animate button appearance tween(timingBonusButton, { alpha: 1, scaleX: 1, scaleY: 1 }, { duration: 300, easing: tween.bounceOut }); tween(timingBonusText, { alpha: 1, scaleX: 1, scaleY: 1 }, { duration: 300, easing: tween.bounceOut }); // Hide button after 3 seconds LK.setTimeout(function () { if (timingBonusActive) { timingBonusActive = false; timingBonusButton.visible = false; timingBonusText.visible = false; timingBonusIndex++; } }, 3000); } } } };
===================================================================
--- original.js
+++ change.js
@@ -254,8 +254,12 @@
var gameStartTime = 0;
var timingBonusTimes = [60000, 180000, 600000, 1800000]; // 1min, 3min, 10min, 30min in milliseconds
var timingBonusActive = false;
var timingBonusIndex = 0;
+// Skill system variables
+var clickPower = 1; // Money earned per click
+var skillUpgradeCost = 100; // Starting cost for skill upgrade
+var skillLevel = 1; // Current skill level
// Bonus screen elements
var bonusContainer = new Container();
bonusContainer.visible = false;
game.addChild(bonusContainer);
@@ -438,8 +442,25 @@
timingBonusText.x = 250;
timingBonusText.y = 200;
timingBonusText.visible = false; // Hide initially
game.addChild(timingBonusText);
+// Skill button
+var skillBtn = game.addChild(LK.getAsset('skillButton', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 1024,
+ y: 2350
+}));
+skillBtn.visible = false; // Hide initially
+var skillBtnText = new Text2('SKILL LV.' + skillLevel + ' - UPGRADE $' + skillUpgradeCost, {
+ size: 80,
+ fill: 0xFFFFFF
+});
+skillBtnText.anchor.set(0.5, 0.5);
+skillBtnText.x = 1024;
+skillBtnText.y = 2350;
+skillBtnText.visible = false; // Hide initially
+game.addChild(skillBtnText);
// Farm screen elements
var farmContainer = new Container();
farmContainer.visible = false;
game.addChild(farmContainer);
@@ -865,8 +886,10 @@
employeeBtn.visible = true;
employeeBtnText.visible = true;
tasksBtn.visible = true;
tasksBtnText.visible = true;
+ skillBtn.visible = true;
+ skillBtnText.visible = true;
if (musicEnabled) {
LK.playMusic('gameMusic');
}
LK.getSound('click').play();
@@ -954,11 +977,11 @@
LK.getSound('click').play();
};
// Event handlers
tomato.down = function (x, y, obj) {
- money += 1;
+ money += clickPower;
totalClicks++;
- totalMoneyEarned++;
+ totalMoneyEarned += clickPower;
updateMoneyDisplay();
LK.getSound('click').play();
// Animate tomato scale - grow then shrink back
tween(tomato, {
@@ -1058,11 +1081,24 @@
tasksBtn.visible = false;
tasksBtnText.visible = false;
specialBonusButton.visible = false;
specialBonusText.visible = false;
+ skillBtn.visible = false;
+ skillBtnText.visible = false;
farmContainer.visible = true;
}
};
+skillBtn.down = function (x, y, obj) {
+ if (money >= skillUpgradeCost) {
+ money -= skillUpgradeCost;
+ skillLevel++;
+ clickPower++;
+ skillUpgradeCost = Math.floor(skillUpgradeCost * 1.5); // Increase cost by 50%
+ skillBtnText.setText('SKILL LV.' + skillLevel + ' - UPGRADE $' + skillUpgradeCost);
+ updateMoneyDisplay();
+ LK.getSound('purchase').play();
+ }
+};
employeeBtn.down = function (x, y, obj) {
if (money >= 25) {
currentScreen = 'employee';
tomato.visible = false;
@@ -1073,8 +1109,10 @@
tasksBtn.visible = false;
tasksBtnText.visible = false;
specialBonusButton.visible = false;
specialBonusText.visible = false;
+ skillBtn.visible = false;
+ skillBtnText.visible = false;
employeeContainer.visible = true;
}
};
farmBackBtn.down = function (x, y, obj) {
@@ -1089,8 +1127,10 @@
if (bonusButtonActive) {
specialBonusButton.visible = true;
specialBonusText.visible = true;
}
+ skillBtn.visible = true;
+ skillBtnText.visible = true;
farmContainer.visible = false;
};
employeeBackBtn.down = function (x, y, obj) {
currentScreen = 'main';
@@ -1104,8 +1144,10 @@
if (bonusButtonActive) {
specialBonusButton.visible = true;
specialBonusText.visible = true;
}
+ skillBtn.visible = true;
+ skillBtnText.visible = true;
employeeContainer.visible = false;
};
tasksBtn.down = function (x, y, obj) {
currentScreen = 'tasks';
@@ -1117,8 +1159,10 @@
tasksBtn.visible = false;
tasksBtnText.visible = false;
specialBonusButton.visible = false;
specialBonusText.visible = false;
+ skillBtn.visible = false;
+ skillBtnText.visible = false;
tasksContainer.visible = true;
};
tasksBackBtn.down = function (x, y, obj) {
currentScreen = 'main';
@@ -1128,8 +1172,10 @@
employeeBtn.visible = true;
employeeBtnText.visible = true;
tasksBtn.visible = true;
tasksBtnText.visible = true;
+ skillBtn.visible = true;
+ skillBtnText.visible = true;
tasksContainer.visible = false;
};
var bonusTitle = new Text2('SPECIAL BONUS!', {
size: 90,
@@ -1226,8 +1272,10 @@
tasksBtn.visible = false;
tasksBtnText.visible = false;
specialBonusButton.visible = false;
specialBonusText.visible = false;
+ skillBtn.visible = false;
+ skillBtnText.visible = false;
LK.getSound('click').play();
}
};
// Timing bonus button event handler
@@ -1247,8 +1295,10 @@
specialBonusButton.visible = false;
specialBonusText.visible = false;
timingBonusButton.visible = false;
timingBonusText.visible = false;
+ skillBtn.visible = false;
+ skillBtnText.visible = false;
LK.getSound('click').play();
}
};
// Bonus close button event handler
@@ -1266,8 +1316,10 @@
employeeBtn.visible = true;
employeeBtnText.visible = true;
tasksBtn.visible = true;
tasksBtnText.visible = true;
+ skillBtn.visible = true;
+ skillBtnText.visible = true;
bonusButtonActive = false;
lastBonusTime = Date.now(); // Reset timer
LK.getSound('purchase').play();
}
@@ -1288,8 +1340,10 @@
employeeBtn.visible = true;
employeeBtnText.visible = true;
tasksBtn.visible = true;
tasksBtnText.visible = true;
+ skillBtn.visible = true;
+ skillBtnText.visible = true;
timingBonusActive = false;
timingBonusIndex++;
LK.getSound('purchase').play();
}