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 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); 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: 100, 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: 100, 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: 100, 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
@@ -18,62 +18,56 @@
// Initialize count for this employee type if not exists
if (!employeeTypeCounts[name]) {
employeeTypeCounts[name] = 0;
}
- // Full screen background for each employee
- var employeeBg = self.attachAsset('taskButtonBg', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 0,
- y: 0,
- scaleX: 0.9,
- scaleY: 0.8
- });
- employeeBg.tint = 0x2196f3;
var nameText = new Text2(name, {
- size: 130,
- fill: 0xFFFFFF
+ size: 90,
+ fill: 0x000000
});
nameText.anchor.set(0.5, 0.5);
nameText.x = 0;
- nameText.y = -80;
+ nameText.y = -40;
self.addChild(nameText);
- var incomeText = new Text2('+$' + income + '/sec income', {
- size: 100,
- fill: 0xFFFFFF
+ var incomeText = new Text2('+$' + income + '/sec', {
+ size: 80,
+ fill: 0x4CAF50
});
incomeText.anchor.set(0.5, 0.5);
incomeText.x = 0;
- incomeText.y = -20;
+ incomeText.y = 0;
self.addChild(incomeText);
var costText = new Text2('Cost: $' + cost, {
- size: 100,
- fill: 0xFFFFFF
+ size: 80,
+ fill: 0x666666
});
costText.anchor.set(0.5, 0.5);
costText.x = 0;
- costText.y = 30;
+ costText.y = 40;
self.addChild(costText);
- self.statusText = new Text2('TAP TO HIRE (0/' + self.maxCount + ')', {
- size: 110,
+ 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 = 90;
+ self.statusText.y = 100;
self.addChild(self.statusText);
- // Make entire employee area clickable
- employeeBg.down = function (x, y, obj) {
+ 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) {
- employeeBg.tint = 0x888888;
- self.statusText.setText('MAXED OUT (' + self.hiredCount + '/' + self.maxCount + ')');
+ self.hireBtn.tint = 0x888888;
}
updateMoneyDisplay();
LK.getSound('purchase').play();
}
@@ -85,101 +79,80 @@
self.name = name;
self.buyPrice = buyPrice;
self.sellPrice = sellPrice;
self.quantity = 0;
- // Full screen background for each item
- var itemBg = self.attachAsset('taskButtonBg', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 0,
- y: 0,
- scaleX: 0.8,
- scaleY: 0.6
- });
- itemBg.tint = color;
var icon = self.attachAsset('itemIcon', {
anchorX: 0.5,
- anchorY: 0.5,
- scaleX: 2,
- scaleY: 2
+ anchorY: 0.5
});
- icon.tint = 0xFFFFFF;
- icon.y = -80;
+ icon.tint = color;
var nameText = new Text2(name, {
- size: 120,
- fill: 0xFFFFFF
+ size: 90,
+ fill: 0x000000
});
nameText.anchor.set(0.5, 0.5);
nameText.x = 0;
- nameText.y = -20;
+ nameText.y = 100;
self.addChild(nameText);
- var priceText = new Text2('Buy: $' + buyPrice + ' | Sell: $' + sellPrice, {
- size: 90,
- fill: 0xFFFFFF
+ var priceText = new Text2('B:$' + buyPrice + ' S:$' + sellPrice, {
+ size: 75,
+ fill: 0x666666
});
priceText.anchor.set(0.5, 0.5);
priceText.x = 0;
- priceText.y = 30;
+ priceText.y = 140;
self.addChild(priceText);
- self.quantityText = new Text2('Owned: 0', {
- size: 100,
- fill: 0xFFFFFF
+ 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 = 80;
+ self.quantityText.y = 200;
self.addChild(self.quantityText);
- // Left half for buying
- var buyArea = self.attachAsset('taskButtonBg', {
+ var buyBtn = self.attachAsset('buyButton', {
anchorX: 0.5,
anchorY: 0.5,
- x: -200,
- y: 0,
- scaleX: 0.35,
- scaleY: 0.6
+ x: -100,
+ y: 270
});
- buyArea.tint = 0x4caf50;
- var buyText = new Text2('TAP TO BUY', {
+ 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 = -200;
- buyText.y = 0;
+ buyText.x = -100;
+ buyText.y = 270;
self.addChild(buyText);
- // Right half for selling
- var sellArea = self.attachAsset('taskButtonBg', {
- anchorX: 0.5,
- anchorY: 0.5,
- x: 200,
- y: 0,
- scaleX: 0.35,
- scaleY: 0.6
- });
- sellArea.tint = 0xf44336;
- var sellText = new Text2('TAP TO SELL', {
+ var sellText = new Text2('SELL', {
size: 80,
fill: 0xFFFFFF
});
sellText.anchor.set(0.5, 0.5);
- sellText.x = 200;
- sellText.y = 0;
+ sellText.x = 100;
+ sellText.y = 270;
self.addChild(sellText);
- buyArea.down = function (x, y, obj) {
+ buyBtn.down = function (x, y, obj) {
if (money >= self.buyPrice) {
money -= self.buyPrice;
self.quantity++;
totalItemsBought++;
- self.quantityText.setText('Owned: ' + self.quantity);
+ self.quantityText.setText('Own: ' + self.quantity);
updateMoneyDisplay();
LK.getSound('purchase').play();
}
};
- sellArea.down = function (x, y, obj) {
+ sellBtn.down = function (x, y, obj) {
if (self.quantity > 0) {
money += self.sellPrice;
self.quantity--;
- self.quantityText.setText('Owned: ' + self.quantity);
+ self.quantityText.setText('Own: ' + self.quantity);
updateMoneyDisplay();
LK.getSound('purchase').play();
}
};
@@ -278,157 +251,134 @@
moneyText.setText('$' + money);
storage.money = money;
storage.passiveIncome = passiveIncome;
}
-// Full Screen Menu Elements
+// Main Menu Elements
var menuContainer = new Container();
game.addChild(menuContainer);
-// Full screen game title
+// Game title - normal text
var gameTitle = new Text2('MANAV TİME!', {
- size: 200,
+ size: 120,
fill: 0x2E7D32
});
gameTitle.anchor.set(0.5, 0.5);
gameTitle.x = 1024;
-gameTitle.y = 400;
+gameTitle.y = 600;
menuContainer.addChild(gameTitle);
-// Full screen start area - covers top third of screen
-var startArea = menuContainer.addChild(LK.getAsset('taskButtonBg', {
+// Start button
+var startBtn = menuContainer.addChild(LK.getAsset('menuButton', {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
- y: 900,
- scaleX: 1.5,
- scaleY: 1.2
+ y: 1200
}));
-var startText = new Text2('TAP TO START', {
- size: 150,
+var startBtnText = new Text2('START', {
+ size: 85,
fill: 0xFFFFFF
});
-startText.anchor.set(0.5, 0.5);
-startText.x = 1024;
-startText.y = 900;
-menuContainer.addChild(startText);
-// Full screen options area - covers middle third
-var optionsArea = menuContainer.addChild(LK.getAsset('taskButtonBg', {
+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: 1500,
- scaleX: 1.5,
- scaleY: 1.2
+ y: 1350
}));
-optionsArea.tint = 0x2196f3;
-var optionsText = new Text2('OPTIONS', {
- size: 150,
+var optionsBtnText = new Text2('OPTIONS', {
+ size: 85,
fill: 0xFFFFFF
});
-optionsText.anchor.set(0.5, 0.5);
-optionsText.x = 1024;
-optionsText.y = 1500;
-menuContainer.addChild(optionsText);
-// Full screen how to play area - covers bottom third
-var howToPlayArea = menuContainer.addChild(LK.getAsset('taskButtonBg', {
+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: 2100,
- scaleX: 1.5,
- scaleY: 1.2
+ y: 1500
}));
-howToPlayArea.tint = 0xff9800;
-var howToPlayText = new Text2('HOW TO PLAY', {
- size: 150,
+var howToPlayBtnText = new Text2('HOW TO PLAY', {
+ size: 85,
fill: 0xFFFFFF
});
-howToPlayText.anchor.set(0.5, 0.5);
-howToPlayText.x = 1024;
-howToPlayText.y = 2100;
-menuContainer.addChild(howToPlayText);
-// Full screen main game elements
-var gameContainer = new Container();
-gameContainer.visible = false;
-game.addChild(gameContainer);
-// Large tomato in center
-var tomato = gameContainer.addChild(LK.getAsset('tomato', {
+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: 800,
- scaleX: 1.5,
- scaleY: 1.5
+ y: 1200
}));
-// Full screen money display
+tomato.visible = false; // Hide initially
var moneyText = new Text2('$' + money, {
- size: 150,
+ size: 80,
fill: 0x2E7D32
});
-moneyText.anchor.set(0.5, 0.5);
-moneyText.x = 1024;
-moneyText.y = 200;
-gameContainer.addChild(moneyText);
+moneyText.anchor.set(1, 0);
+LK.gui.topRight.addChild(moneyText);
var passiveText = new Text2('+$' + passiveIncome + '/sec', {
- size: 100,
+ size: 50,
fill: 0x4CAF50
});
-passiveText.anchor.set(0.5, 0.5);
-passiveText.x = 1024;
-passiveText.y = 300;
-gameContainer.addChild(passiveText);
-// Full screen farm area - bottom left quarter
-var farmArea = gameContainer.addChild(LK.getAsset('taskButtonBg', {
+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: 512,
- y: 1800,
- scaleX: 0.75,
- scaleY: 1.5
+ x: 1024,
+ y: 1800
}));
-farmArea.tint = 0x4caf50;
-var farmText = new Text2('FARM\nMARKET', {
- size: 120,
+farmBtn.visible = false; // Hide initially
+var farmBtnText = new Text2('FARM', {
+ size: 100,
fill: 0xFFFFFF
});
-farmText.anchor.set(0.5, 0.5);
-farmText.x = 512;
-farmText.y = 1800;
-gameContainer.addChild(farmText);
-// Full screen employee area - bottom right quarter
-var employeeArea = gameContainer.addChild(LK.getAsset('taskButtonBg', {
+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: 1536,
- y: 1800,
- scaleX: 0.75,
- scaleY: 1.5
+ x: 1024,
+ y: 1920
}));
-employeeArea.tint = 0x2196f3;
-var employeeText = new Text2('HIRE\nEMPLOYEES', {
- size: 120,
+employeeBtn.visible = false; // Hide initially
+var employeeBtnText = new Text2('EMPLOYEES', {
+ size: 100,
fill: 0xFFFFFF
});
-employeeText.anchor.set(0.5, 0.5);
-employeeText.x = 1536;
-employeeText.y = 1800;
-gameContainer.addChild(employeeText);
-// Full screen tasks area - middle bottom
-var tasksArea = gameContainer.addChild(LK.getAsset('taskButtonBg', {
+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: 2300,
- scaleX: 1.5,
- scaleY: 1.0
+ y: 2040
}));
-tasksArea.tint = 0xff9800;
-var tasksText = new Text2('TASKS & MISSIONS', {
- size: 120,
+tasksBtn.visible = false; // Hide initially
+var tasksBtnText = new Text2('TASKS', {
+ size: 100,
fill: 0xFFFFFF
});
-tasksText.anchor.set(0.5, 0.5);
-tasksText.x = 1024;
-tasksText.y = 2300;
-gameContainer.addChild(tasksText);
+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);
@@ -439,52 +389,52 @@
farmTitle.anchor.set(0.5, 0.5);
farmTitle.x = 1024;
farmTitle.y = 200;
farmContainer.addChild(farmTitle);
-// Create farm items with full-screen layout
+// Create farm items
var apple = new FarmItem('Apple', 5, 8, 0xff0000);
-apple.x = 512;
+apple.x = 400;
apple.y = 500;
farmContainer.addChild(apple);
farmItems.push(apple);
var banana = new FarmItem('Banana', 3, 5, 0xffff00);
-banana.x = 1536;
+banana.x = 1024;
banana.y = 500;
farmContainer.addChild(banana);
farmItems.push(banana);
var carrot = new FarmItem('Carrot', 7, 12, 0xff8800);
-carrot.x = 512;
-carrot.y = 800;
+carrot.x = 1648;
+carrot.y = 500;
farmContainer.addChild(carrot);
farmItems.push(carrot);
var lettuce = new FarmItem('Lettuce', 4, 7, 0x00ff00);
-lettuce.x = 1536;
-lettuce.y = 800;
+lettuce.x = 400;
+lettuce.y = 900;
farmContainer.addChild(lettuce);
farmItems.push(lettuce);
var potato = new FarmItem('Potato', 6, 10, 0x8b4513);
-potato.x = 512;
-potato.y = 1100;
+potato.x = 1024;
+potato.y = 900;
farmContainer.addChild(potato);
farmItems.push(potato);
var corn = new FarmItem('Corn', 8, 15, 0xffd700);
-corn.x = 1536;
-corn.y = 1100;
+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: 1500
+ y: 1400
}));
var farmBackText = new Text2('BACK', {
size: 60,
fill: 0xFFFFFF
});
farmBackText.anchor.set(0.5, 0.5);
farmBackText.x = 1024;
-farmBackText.y = 1500;
+farmBackText.y = 1400;
farmContainer.addChild(farmBackText);
// Employee screen elements
var employeeContainer = new Container();
employeeContainer.visible = false;
@@ -496,42 +446,42 @@
employeeTitle.anchor.set(0.5, 0.5);
employeeTitle.x = 1024;
employeeTitle.y = 200;
employeeContainer.addChild(employeeTitle);
-// Create employees with full-screen layout
+// Create employees
var farmWorker = new Employee('Farm Worker', 50, 1);
-farmWorker.x = 1024;
-farmWorker.y = 450;
+farmWorker.x = 512;
+farmWorker.y = 500;
employeeContainer.addChild(farmWorker);
employees.push(farmWorker);
var supervisor = new Employee('Supervisor', 200, 5);
-supervisor.x = 1024;
-supervisor.y = 700;
+supervisor.x = 1536;
+supervisor.y = 500;
employeeContainer.addChild(supervisor);
employees.push(supervisor);
var manager = new Employee('Manager', 1000, 25);
-manager.x = 1024;
-manager.y = 950;
+manager.x = 512;
+manager.y = 800;
employeeContainer.addChild(manager);
employees.push(manager);
var ceo = new Employee('CEO', 5000, 100);
-ceo.x = 1024;
-ceo.y = 1200;
+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: 1500
+ y: 1200
}));
var employeeBackText = new Text2('BACK', {
size: 60,
fill: 0xFFFFFF
});
employeeBackText.anchor.set(0.5, 0.5);
employeeBackText.x = 1024;
-employeeBackText.y = 1500;
+employeeBackText.y = 1200;
employeeContainer.addChild(employeeBackText);
// Tasks screen elements
var tasksContainer = new Container();
tasksContainer.visible = false;
@@ -626,26 +576,32 @@
optionsBackText.anchor.set(0.5, 0.5);
optionsBackText.x = 1024;
optionsBackText.y = 1200;
optionsContainer.addChild(optionsBackText);
-// Menu Event handlers for full-screen areas
-startArea.down = function (x, y, obj) {
+// Menu Event handlers
+startBtn.down = function (x, y, obj) {
currentScreen = 'main';
gameStarted = true;
menuContainer.visible = false;
- gameContainer.visible = true;
+ 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();
};
-optionsArea.down = function (x, y, obj) {
+optionsBtn.down = function (x, y, obj) {
currentScreen = 'options';
menuContainer.visible = false;
optionsContainer.visible = true;
LK.getSound('click').play();
};
-howToPlayArea.down = function (x, y, obj) {
+howToPlayBtn.down = function (x, y, obj) {
// How to play functionality can be added later
LK.getSound('click').play();
};
// Options screen event handlers
@@ -767,40 +723,76 @@
}
});
}
};
-farmArea.down = function (x, y, obj) {
+farmBtn.down = function (x, y, obj) {
if (money >= 10) {
currentScreen = 'farm';
- gameContainer.visible = false;
+ tomato.visible = false;
+ farmBtn.visible = false;
+ farmBtnText.visible = false;
+ employeeBtn.visible = false;
+ employeeBtnText.visible = false;
+ tasksBtn.visible = false;
+ tasksBtnText.visible = false;
farmContainer.visible = true;
}
};
-employeeArea.down = function (x, y, obj) {
+employeeBtn.down = function (x, y, obj) {
if (money >= 25) {
currentScreen = 'employee';
- gameContainer.visible = false;
+ 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';
- gameContainer.visible = true;
+ 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';
- gameContainer.visible = true;
+ tomato.visible = true;
+ farmBtn.visible = true;
+ farmBtnText.visible = true;
+ employeeBtn.visible = true;
+ employeeBtnText.visible = true;
+ tasksBtn.visible = true;
+ tasksBtnText.visible = true;
employeeContainer.visible = false;
};
-tasksArea.down = function (x, y, obj) {
+tasksBtn.down = function (x, y, obj) {
currentScreen = 'tasks';
- gameContainer.visible = false;
+ 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';
- gameContainer.visible = true;
+ 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 () {
@@ -812,25 +804,24 @@
}, 1000);
game.update = function () {
// Only update game logic if game has started
if (gameStarted && currentScreen !== 'menu') {
- // Update area visibility based on money
+ // Update button visibility based on money
if (money >= 10) {
- farmArea.alpha = 1;
- farmText.alpha = 1;
+ farmBtn.alpha = 1;
+ farmBtnText.alpha = 1;
} else {
- farmArea.alpha = 0.5;
- farmText.alpha = 0.5;
+ farmBtn.alpha = 0.5;
+ farmBtnText.alpha = 0.5;
}
if (money >= 25) {
- employeeArea.alpha = 1;
- employeeText.alpha = 1;
+ employeeBtn.alpha = 1;
+ employeeBtnText.alpha = 1;
} else {
- employeeArea.alpha = 0.5;
- employeeText.alpha = 0.5;
+ employeeBtn.alpha = 0.5;
+ employeeBtnText.alpha = 0.5;
}
- // Update money and passive income display
- moneyText.setText('$' + money);
+ // Update passive income display
passiveText.setText('+$' + passiveIncome + '/sec');
// Update task progress
if (tasks.length > 0) {
tasks[0].updateProgress(totalClicks); // Click task