User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'tree3_below.lastY = tree3_below.y;' Line Number: 1271
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1270
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'tree3_below.lastY = tree3_below.y;' Line Number: 1271
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1270
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1272
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1272
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'tree3_below.lastY = tree3_below.y;' Line Number: 1270
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1269
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1272
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1269
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1273
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1271
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1269
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1271
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1269
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1271
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1269
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1259
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1259
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1259
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1259
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'var tree6 = new Tree('tree6', 700, 1666);' Line Number: 1262
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1262
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1259
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'self.addChild(tree3_below);' Line Number: 1259
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Page0 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'woodarea' with the anchor point set to 0.5, 0.5 var background0 = self.attachAsset('background0', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366, scaleX: 1.5, scaleY: 1.5 }); var woodarea = self.attachAsset('woodarea', { anchorX: 4.5, anchorY: 2.5, x: background0.x, // Sync initial x position with background0 y: background0.y // Sync initial y position with background0 }); self.addChild(woodarea); self.lastX = background0.x; self.lastY = background0.y; // Add drag functionality to the background1 image self.down = function (x, y, obj) { self.dragging = true; self.data = obj.data; self.initialClick = { x: x, y: y }; self.offset = { x: background0.x - x, y: background0.y - y }; }; self.up = function () { self.dragging = false; self.data = null; }; self.move = function (x, y, obj) { if (self.dragging) { // Check if we reached the Y position 1000 right now as we were not there before if (self.lastY <= 1000 && background0.y > 1000) { console.log("Background0 reached Y position 1000"); } // Check if woodarea reached the Y position 1500 right now as it was not there before if (self.lastY <= 1500 && woodarea.y > 1500) { console.log("Woodarea reached Y position 1500"); } // Check if we reached the X position 500 right now as we were not there before if (self.lastX <= 500 && background0.x > 500) { console.log("Background0 reached X position 500"); } // Check if we reached the X position 1500 right now as we were not there before if (self.lastX <= 1500 && background0.x > 1500) { console.log("Background0 reached X position 1500"); } var dx = x - self.initialClick.x; var dy = y - self.initialClick.y; background0.x = x + self.offset.x; background0.y = y + self.offset.y; woodarea.x = background0.x; // Sync woodarea's x position with background0 woodarea.y = background0.y; // Sync woodarea's y position with background0 gate1.x = background0.x; // Sync gate1's x position with background0 gate1.y = background0.y; // Sync gate1's y position with background0 gate2.x = background0.x; // Sync gate2's x position with background0 gate2.y = background0.y; // Sync gate2's y position with background0 gate3.x = background0.x; // Sync gate3's x position with background0 gate3.y = background0.y; // Sync gate3's y position with background0 gate4.x = background0.x; // Sync gate4's x position with background0 gate4.y = background0.y; // Sync gate4's y position with background0 gate5.x = background0.x; // Sync gate5's x position with background0 gate5.y = background0.y; // Sync gate5's y position with background0 gate6.x = background0.x; // Sync gate6's x position with background0 gate6.y = background0.y; // Sync gate6's y position with background0 self.initialClick = { x: x, y: y }; self.lastX = background0.x; self.lastY = background0.y; } }; // Get and automatically addChild to self asset with id 'gate1' with the anchor point set to 0.5, 0.5 var gate1 = self.attachAsset('gate1', { anchorX: 9.5, anchorY: 1.4, x: 1024, y: 1366 }); // Add click event to gate1 to navigate to Page1 gate1.down = function (x, y, obj) { // Navigate to Page1 game.removeChild(page); page = game.addChild(new Page1()); }; // Get and automatically addChild to self asset with id 'gate2' with the anchor point set to 0.5, 0.5 var gate2 = self.attachAsset('gate2', { anchorX: 5.5, anchorY: 0.8, x: 1024, y: 1366 }); // Add click event to gate2 to navigate to Page2 gate2.down = function (x, y, obj) { // Navigate to Page2 game.removeChild(page); page = game.addChild(new Page2()); }; // Get and automatically addChild to self asset with id 'gate3' with the anchor point set to 0.5, 0.5 var gate3 = self.attachAsset('gate3', { anchorX: 2.4, anchorY: -3.5, x: 1024, y: 1366 }); // Add click event to gate3 to navigate to Page3 gate3.down = function (x, y, obj) { // Navigate to Page3 game.removeChild(page); page = game.addChild(new Page3()); }; // Get and automatically addChild to self asset with id 'gate4' with the anchor point set to 0.5, 0.5 var gate4 = self.attachAsset('gate4', { anchorX: 9.8, anchorY: 9.8, x: 1024, y: 1366 }); gate4.x = background0.x; // Sync gate4's x position with background0 gate4.y = background0.y; // Sync gate4's y position with background0 // Add click event to gate4 to navigate to Page4 gate4.down = function (x, y, obj) { // Navigate to Page4 game.removeChild(page); page = game.addChild(new Page4()); }; // Get and automatically addChild to self asset with id 'gate5' with the anchor point set to 0.5, 0.5 var gate5 = self.attachAsset('gate5', { anchorX: 3, anchorY: 7, x: 1024, y: 1366 }); gate5.x = background0.x; // Sync gate5's x position with background0 gate5.y = background0.y; // Sync gate5's y position with background0 // Add click event to gate5 to navigate to Page5 gate5.down = function (x, y, obj) { // Navigate to Page5 game.removeChild(page); page = game.addChild(new Page5()); }; // Get and automatically addChild to self asset with id 'gate6' with the anchor point set to 0.5, 0.5 var gate6 = self.attachAsset('gate6', { anchorX: -6, anchorY: 7.5, x: 1024, y: 1366 }); gate6.x = background0.x; // Sync gate6's x position with background0 gate6.y = background0.y; // Sync gate6's y position with background0 // Add click event to gate6 to navigate to Page1 gate6.down = function (x, y, obj) { // Navigate to Page6 game.removeChild(page); page = game.addChild(new Page6()); }; }); // Create a Page1 class by using the LK expand method to extend Container. var Page1 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background1' with the anchor point set to 0, 0 var background1 = self.attachAsset('background1', { anchorX: 0, anchorY: 0, x: 0, y: 0 }); // Get and automatically addChild to self asset with id 'wall1' with the anchor point set to 0.5, 1.0 var wall1 = self.attachAsset('wall1', { anchorX: 0.5, anchorY: 1.0, x: 1024, // Center horizontally y: 2732 // Position at the bottom }); var tree2 = new Tree('tree2', 700, 1366); self.addChild(tree2); tree2.clickCount = 0; // Add timer text for tree2 var tree2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree2TimerText.anchor.set(0.5, 0.5); tree2TimerText.x = 1200; // horizontal postision beside tree2 tree2TimerText.y = 665; // vertical Position beside tree2 tree2TimerText.visible = false; tree2.down = function (x, y, obj) { tree2.clickCount++; if (tree2.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree2.clickCount === 3) { tree2.visible = false; tree2.clickCount = 0; // Reset click count to allow new interactions } }; var half_tree2 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 1085, // Position half_tree2 to the right of tree2 y: 890 // Align vertically with tree2 }); var tree1 = self.attachAsset('tree1', { anchorX: -1.1, anchorY: 3, x: 1000, // Position tree1 to the right of tree2 y: 1366 // Align vertically with tree2 }); self.addChild(tree1); var half_tree1 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 1385, // Position half_tree1 to the right of tree1 y: 890 // Align vertically with tree1 }); tree1.clickCount = 0; // Add timer text for tree1 var tree1TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree1TimerText.anchor.set(0.5, 0.5); tree1TimerText.x = tree1.x + 500; // horizontal postision beside tree1 tree1TimerText.y = tree1.y - 700; // vertical Position beside tree1 tree1TimerText.visible = false; tree1.down = function (x, y, obj) { tree1.clickCount++; if (tree1.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree1.clickCount === 3) { tree1.visible = false; tree1.clickCount = 0; // Reset click count to allow new interactions } }; tree2.down = function (x, y, obj) { tree2.incrementClickCount(); if (tree2.getClickCount() <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree2.getClickCount() === 3) { tree2.hide(); } }; var tree2_below = self.attachAsset('tree2', { anchorX: -1.1, anchorY: 3, x: 700, // Align horizontally with tree6 y: 1966 // Position tree2 below tree6 }); var half_tree2_below = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 1085, // Position half_tree2_below to the right of tree2_below y: 1495 // Align vertically with tree2_below }); tree2_below.clickCount = 0; // Add timer text for tree2_below var tree2BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree2BelowTimerText.anchor.set(0.5, 0.5); tree2BelowTimerText.x = tree2_below.x + 500; // horizontal position beside tree2_below tree2BelowTimerText.y = tree2_below.y - 700; // vertical position beside tree2_below tree2BelowTimerText.visible = false; tree2_below.down = function (x, y, obj) { tree2_below.clickCount++; if (tree2_below.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree2_below.clickCount === 3) { tree2_below.visible = false; } }; var tree3_below2 = new Tree('tree3', 380, 2566); tree3_below2.lastX = tree3_below2.x; tree3_below2.lastY = tree3_below2.y; self.addChild(tree3_below2); // Add timer text for tree3_below2 var tree3Below2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree3Below2TimerText.anchor.set(0.5, 0.5); tree3Below2TimerText.x = tree3_below2.x + 880; // horizontal position beside tree3_below2 tree3Below2TimerText.y = tree3_below2.y + 1870; // vertical position aligned with tree3_below2 tree3Below2TimerText.visible = false; var half_tree3_below2 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 765, // Position half_tree3_below2 to the right of tree3_below2 y: 2095 // Align vertically with tree3_below2 }); tree3_below2.down = function (x, y, obj) { tree3_below2.incrementClickCount(); if (tree3_below2.getClickCount() <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree3_below2.getClickCount() === 3) { tree3_below2.hide(); } }; // Removed statue4_below2 from tree4_below2 var tree4_below2 = new Tree('tree4', 80, 2566); tree4_below2.lastX = tree4_below2.x; tree4_below2.lastY = tree4_below2.y; self.addChild(tree4_below2); // Add timer text for tree4_below2 var tree4Below2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree4Below2TimerText.anchor.set(0.5, 0.5); tree4Below2TimerText.x = tree4_below2.x + 580; // horizontal position beside tree4_below2 tree4Below2TimerText.y = tree4_below2.y + 1870; // vertical position beside tree4_below2 tree4Below2TimerText.visible = false; var half_tree4_below2 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 465, // Position half_tree4_below2 to the right of tree4_below2 y: 2095 // Align vertically with tree4_below2 }); tree4_below2.down = function (x, y, obj) { tree4_below2.incrementClickCount(); if (tree4_below2.getClickCount() <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree4_below2.getClickCount() === 3) { tree4_below2.hide(); } }; // Add statue beside tree2 similar to tree1 // Add woodstatue below tree3 // Add woodstatue below tree7 var tree3_below = new Tree('tree3', 380, 1966); tree3_below.lastX = tree3_below.x; tree3_below.lastY = tree3_below.y; self.addChild(tree3_below); tree3_below.down = function (x, y, obj) { tree3_below.incrementClickCount(); if (tree3_below.getClickCount() <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree3_below.getClickCount() === 3) { tree3_below.hide(); } }; // Removed duplicate tree3_below definition and initialization var half_tree3_below = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 765, // Position half_tree3_below to the right of tree3_below y: 1495 // Align vertically with tree3_below }); tree3_below.clickCount = 0; // Add timer text for tree3_below var tree3BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree3BelowTimerText.anchor.set(0.5, 0.5); tree3BelowTimerText.x = tree3_below.x + 500; // horizontal position beside tree3_below tree3BelowTimerText.y = tree3_below.y - 700; // vertical position beside tree3_below tree3BelowTimerText.visible = false; tree3_below.down = function (x, y, obj) { tree3_below.clickCount++; if (tree3_below.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree3_below.clickCount === 3) { tree3_below.visible = false; } }; // Get and automatically addChild to self asset with id 'tree7' with the anchor point set to 0.5, 0.5 var tree7_below = self.attachAsset('tree7', { anchorX: -1.1, anchorY: 3, x: 380, // Align horizontally with tree3_below y: 2266 // Position tree7 below tree3_below }); var half_tree7_below = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 765, // Position half_tree7_below to the right of tree7_below y: 1795 // Align vertically with tree7_below }); tree7_below.clickCount = 0; // Add timer text for tree7_below var tree7BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree7BelowTimerText.anchor.set(0.5, 0.5); tree7BelowTimerText.x = tree7_below.x + 500; // horizontal position beside tree7_below tree7BelowTimerText.y = tree7_below.y - 700; // vertical position beside tree7_below tree7BelowTimerText.visible = false; tree7_below.down = function (x, y, obj) { tree7_below.clickCount++; if (tree7_below.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree7_below.clickCount === 3) { tree7_below.visible = false; } }; // Get and automatically addChild to self asset with id 'tree4' with the anchor point set to 0.5, 0.5 var tree4 = self.attachAsset('tree4', { anchorX: -1.1, anchorY: 3, x: 100, y: 1366 }); // Add timer text for tree4 tree4.clickCount = 0; // Add timer text for tree4 var tree4TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree4TimerText.anchor.set(0.5, 0.5); tree4TimerText.x = tree4.x + 500; // horizontal position beside tree4 tree4TimerText.y = tree4.y - 700; // vertical position beside tree4 tree4TimerText.visible = false; tree4.down = function (x, y, obj) { tree4.clickCount++; if (tree4.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree4.clickCount === 3) { tree4.visible = false; tree4.clickCount = 0; // Reset click count to allow new interactions } }; tree4.clickCount = 0; var half_tree4 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 485, // Position half_tree4 to the right of tree4 y: 890 // Align vertically with tree4 }); tree4.down = function (x, y, obj) { tree4.clickCount++; if (tree4.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree4.clickCount === 3) { tree4.visible = false; } }; var tree3 = self.attachAsset('tree3', { anchorX: -1.1, anchorY: 3, x: 380, y: 1366 }); // Add timer text for tree3 tree3.clickCount = 0; // Add timer text for tree3 var tree3TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree3TimerText.anchor.set(0.5, 0.5); tree3TimerText.x = tree3.x + 500; // horizontal position beside tree3 tree3TimerText.y = tree3.y - 700; // vertical position beside tree3 tree3TimerText.visible = false; tree3.down = function (x, y, obj) { tree3.clickCount++; if (tree3.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree3.clickCount === 3) { tree3.visible = false; tree3.clickCount = 0; // Reset click count to allow new interactions } }; var half_tree3 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 765, // Position half_tree3 to the right of tree3 y: 890 // Align vertically with tree3 }); tree3.clickCount = 0; tree3.down = function (x, y, obj) { tree3.clickCount++; if (tree3.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree3.clickCount === 3) { tree3.visible = false; } }; tree3.down = function (x, y, obj) { tree3.clickCount++; if (tree3.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree3.clickCount === 3) { tree3.visible = false; } }; // Add woodstatue below tree4 // Add woodstatue below tree5 var tree1_below = new Tree('tree1', 1000, 1966); tree1_below.lastX = tree1_below.x; tree1_below.lastY = tree1_below.y; var half_tree1_below = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 1385, // Position half_tree1_below to the right of tree1_below y: 1495 // Align vertically with tree1_below }); tree1_below.clickCount = 0; // Add timer text for tree1_below var tree1BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree1BelowTimerText.anchor.set(0.5, 0.5); tree1BelowTimerText.x = tree1_below.x + 500; // horizontal position beside tree1_below tree1BelowTimerText.y = tree1_below.y - 700; // vertical position beside tree1_below tree1BelowTimerText.visible = false; tree1_below.down = function (x, y, obj) { tree1_below.clickCount++; if (tree1_below.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree1_below.clickCount === 3) { tree1_below.visible = false; } }; // Get and automatically addChild to self asset with id 'tree5' with the anchor point set to 0.5, 0.5 var tree5_below = self.attachAsset('tree5', { anchorX: -1.1, anchorY: 3, x: 1000, // Align horizontally with tree1_below y: 2266 // Position tree5 below tree1_below }); var half_tree5_below = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 1385, // Position half_tree5_below to the right of tree5_below y: 1795 // Align vertically with tree5_below }); tree5_below.clickCount = 0; // Add timer text for tree5_below var tree5BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree5BelowTimerText.anchor.set(0.5, 0.5); tree5BelowTimerText.x = tree5_below.x + 500; // horizontal position beside tree5_below tree5BelowTimerText.y = tree5_below.y - 700; // vertical position beside tree5_below tree5BelowTimerText.visible = false; tree5_below.down = function (x, y, obj) { tree5_below.clickCount++; if (tree5_below.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree5_below.clickCount === 3) { tree5_below.visible = false; } }; // Add tree1_below2 to Page1 var tree1_below2 = self.attachAsset('tree1', { anchorX: -1.1, anchorY: 3, x: 1000, // Align horizontally with tree5_below y: 2566 // Position tree1_below2 below tree5_below }); var half_tree1_below2 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 1385, // Position half_tree1_below2 to the right of tree1_below2 y: 2095 // Align vertically with tree1_below2 }); tree1_below2.clickCount = 0; // Add timer text for tree1_below2 var tree1Below2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree1Below2TimerText.anchor.set(0.5, 0.5); tree1Below2TimerText.x = tree1_below2.x + 500; // horizontal position beside tree1_below2 tree1Below2TimerText.y = tree1_below2.y - 700; // vertical position beside tree1_below2 tree1Below2TimerText.visible = false; tree1_below2.down = function (x, y, obj) { tree1_below2.clickCount++; if (tree1_below2.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree1_below2.clickCount === 3) { tree1_below2.visible = false; } }; // Get and automatically addChild to self asset with id 'tree6' with the anchor point set to 0.5, 0.5 var tree6 = self.attachAsset('tree6', { anchorX: -1.1, anchorY: 3, x: 700, // Position tree6 to the left of tree5 y: 1666 // Align vertically with tree5 }); // Add timer text for tree6 tree6.clickCount = 0; // Add timer text for tree6 var tree6TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree6TimerText.anchor.set(0.5, 0.5); tree6TimerText.x = tree6.x + 500; // horizontal position beside tree6 tree6TimerText.y = tree6.y - 700; // vertical position beside tree6 tree6TimerText.visible = false; tree6.down = function (x, y, obj) { tree6.clickCount++; if (tree6.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree6.clickCount === 3) { tree6.visible = false; tree6.clickCount = 0; // Reset click count to allow new interactions } }; tree6.clickCount = 0; var half_tree6 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 1085, // Position half_tree6 to the right of tree6 y: 1195 // Align vertically with tree6 }); tree6.down = function (x, y, obj) { tree6.clickCount++; if (tree6.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree6.clickCount === 3) { tree6.visible = false; } }; var tree5 = self.attachAsset('tree5', { anchorX: -1.1, anchorY: 3, x: 1000, // Align horizontally with tree1 y: 1666 // Position tree5 below tree1 }); // Add timer text for tree5 tree5.clickCount = 0; // Add timer text for tree5 var tree5TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree5TimerText.anchor.set(0.5, 0.5); tree5TimerText.x = tree5.x + 500; // horizontal position beside tree5 tree5TimerText.y = tree5.y - 700; // vertical position beside tree5 tree5TimerText.visible = false; tree5.down = function (x, y, obj) { tree5.clickCount++; if (tree5.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree5.clickCount === 3) { tree5.visible = false; tree5.clickCount = 0; // Reset click count to allow new interactions } }; var half_tree5 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 1385, // Position half_tree5 to the right of tree5 y: 1195 // Align vertically with tree5 }); tree5.clickCount = 0; tree5.down = function (x, y, obj) { tree5.clickCount++; if (tree5.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree5.clickCount === 3) { tree5.visible = false; } }; // Add woodstatue below tree6 // Get and automatically addChild to self asset with id 'tree6' with the anchor point set to 0.5, 0.5 var tree6_below = self.attachAsset('tree6', { anchorX: -1.1, anchorY: 3, x: 700, // Align horizontally with tree2_below y: 2266 // Position tree6 below tree2_below }); var half_tree6_below = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 1085, // Position half_tree6_below to the right of tree6_below y: 1795 // Align vertically with tree6_below }); tree6_below.clickCount = 0; // Add timer text for tree6_below var tree6BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree6BelowTimerText.anchor.set(0.5, 0.5); tree6BelowTimerText.x = tree6_below.x + 500; // horizontal position beside tree6_below tree6BelowTimerText.y = tree6_below.y - 700; // vertical position beside tree6_below tree6BelowTimerText.visible = false; tree6_below.down = function (x, y, obj) { tree6_below.clickCount++; if (tree6_below.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree6_below.clickCount === 3) { tree6_below.visible = false; } }; // Add tree2_below2 to Page1 var tree2_below2 = self.attachAsset('tree2', { anchorX: -1.1, anchorY: 3, x: 700, // Align horizontally with tree6_below y: 2566 // Position tree2_below2 below tree6_below }); var half_tree2_below2 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 1085, // Position half_tree2_below2 to the right of tree2_below2 y: 2095 // Align vertically with tree2_below2 }); tree2_below2.clickCount = 0; tree2_below2.down = function (x, y, obj) { tree2_below2.clickCount++; if (tree2_below2.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree2_below2.clickCount === 3) { tree2_below2.visible = false; } }; // Add timer text for tree2_below2 var tree2Below2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree2Below2TimerText.anchor.set(0.5, 0.5); tree2Below2TimerText.x = tree2_below2.x + 500; // horizontal position beside tree2_below2 tree2Below2TimerText.y = tree2_below2.y - 700; // vertical position beside tree2_below2 tree2Below2TimerText.visible = false; // Get and automatically addChild to self asset with id 'tree8' with the anchor point set to 0.5, 0.5 var tree8 = self.attachAsset('tree8', { anchorX: -1.1, anchorY: 3, x: 80, // Position tree8 to the left of tree7 y: 1666 // Align vertically with tree7 }); // Add timer text for tree8 tree8.clickCount = 0; // Add timer text for tree8 var tree8TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree8TimerText.anchor.set(0.5, 0.5); tree8TimerText.x = tree8.x + 150; // horizontal position beside tree8 tree8TimerText.y = tree8.y; // vertical position beside tree8 tree8TimerText.visible = false; tree8.down = function (x, y, obj) { tree8.clickCount++; if (tree8.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree8.clickCount === 3) { tree8.visible = false; tree8.clickCount = 0; // Reset click count to allow new interactions } }; var half_tree8 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 465, // Position half_tree8 to the right of tree8 y: 1195 // Align vertically with tree8 }); tree8.clickCount = 0; tree8.down = function (x, y, obj) { tree8.clickCount++; if (tree8.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree8.clickCount === 3) { tree8.visible = false; } }; var tree7 = self.attachAsset('tree7', { anchorX: -1.1, anchorY: 3, x: 380, // Align horizontally with tree3 y: 1666 // Position tree7 below tree3 }); // Add timer text for tree7 tree7.clickCount = 0; // Add timer text for tree7 var tree7TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree7TimerText.anchor.set(0.5, 0.5); tree7TimerText.x = tree7.x + 500; // horizontal position beside tree7 tree7TimerText.y = tree7.y - 700; // vertical position beside tree7 tree7TimerText.visible = false; tree7.down = function (x, y, obj) { tree7.clickCount++; if (tree7.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree7.clickCount === 3) { tree7.visible = false; tree7.clickCount = 0; // Reset click count to allow new interactions } }; var half_tree7 = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 765, // Position half_tree7 to the right of tree7 y: 1195 // Align vertically with tree7 }); tree7.clickCount = 0; tree7.down = function (x, y, obj) { tree7.clickCount++; if (tree7.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree7.clickCount === 3) { tree7.visible = false; } }; // Add woodstatue below tree8 // Get and automatically addChild to self asset with id 'tree4' with the anchor point set to 0.5, 0.5 var tree4_below = self.attachAsset('tree4', { anchorX: -1.1, anchorY: 3, x: 80, // Align horizontally with tree8 y: 1966 // Position tree4 below tree8 }); var half_tree4_below = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 465, // Position half_tree4_below to the right of tree4_below y: 1495 // Align vertically with tree4_below }); tree4_below.clickCount = 0; // Add timer text for tree4_below var tree4BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree4BelowTimerText.anchor.set(0.5, 0.5); tree4BelowTimerText.x = tree4_below.x + 500; // horizontal position beside tree4_below tree4BelowTimerText.y = tree4_below.y - 700; // vertical position beside tree4_below tree4BelowTimerText.visible = false; tree4_below.down = function (x, y, obj) { tree4_below.clickCount++; if (tree4_below.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree4_below.clickCount === 3) { tree4_below.visible = false; } }; // Get and automatically addChild to self asset with id 'tree8' with the anchor point set to 0.5, 0.5 var tree8_below = self.attachAsset('tree8', { anchorX: -1.1, anchorY: 3, x: 80, // Align horizontally with tree4_below y: 2266 // Position tree8 below tree4_below }); var half_tree8_below = self.attachAsset('half_tree', { anchorX: -1.1, anchorY: 3, x: 465, // Position half_tree8_below to the right of tree8_below y: 1795 // Align vertically with tree8_below }); tree8_below.clickCount = 0; // Add timer text for tree8_below var tree8BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree8BelowTimerText.anchor.set(0.5, 0.5); tree8BelowTimerText.x = tree8_below.x + 150; // horizontal position beside tree8_below tree8BelowTimerText.y = tree8_below.y; // vertical position beside tree8_below tree8BelowTimerText.visible = false; tree8_below.down = function (x, y, obj) { tree8_below.clickCount++; if (tree8_below.clickCount <= 3) { totalStatueScore += 5; woodScoreText.setText(totalStatueScore); } if (tree8_below.clickCount === 3) { tree8_below.visible = false; } }; // Get and automatically addChild to self asset with id 'tree1' with the anchor point set to 0.5, 0.5 // Get and automatically addChild to self asset with id 'tree2' with the anchor point set to 0.5, 0.5 // Get and automatically addChild to self asset with id 'tree3' with the anchor point set to 0.5, 0.5 // Get and automatically addChild to self asset with id 'tree4' with the anchor point set to 0.5, 0.5 // Add wood asset to Page1 var wood = self.attachAsset('wood', { anchorX: 0.5, anchorY: 0.5, x: 1902, // Position wood in the middle of the screen y: 2510 // Position wood below the trees }); // Add text for wood score beside wood asset var woodScoreText = new Text2('0', { size: 70, fill: 0x471e00 }); woodScoreText.anchor.set(1, 0.5); woodScoreText.x = wood.x - 90; // Position text to the left of the wood woodScoreText.y = wood.y; self.addChild(woodScoreText); // Hide the statue beside the wood // statue.visible = false; // Commented out as statue is not defined var silver = self.attachAsset('silver', { anchorX: 0.5, anchorY: 0.5, x: 1902, // Align horizontally with wood y: 2660 // Position silver directly below the wood }); // Add text for silver score beside silver asset var silverScoreText = new Text2('0', { size: 70, fill: 0xc0c0c0 }); silver.clickCount = 0; silver.down = function (x, y, obj) { silver.clickCount += 5; silverScoreText.setText(silver.clickCount); }; silverScoreText.anchor.set(1, 0.5); silverScoreText.x = silver.x - 90; // Position text to the left of the silver silverScoreText.y = silver.y; self.addChild(silverScoreText); var stone = self.attachAsset('stone', { anchorX: 0.5, anchorY: 0.5, x: 1220, // Position stone in the middle of the screen y: 2510 // Position stone below the wood }); // Add text for stone score beside stone asset var stoneScoreText = new Text2('0', { size: 70, fill: 0x00ff00 }); stone.clickCount = 0; stone.down = function (x, y, obj) { stone.clickCount += 5; stoneScoreText.setText(stone.clickCount); }; stoneScoreText.anchor.set(1, 0.5); stoneScoreText.x = stone.x - 90; // Position text to the left of the stone stoneScoreText.y = stone.y; self.addChild(stoneScoreText); var gold = self.attachAsset('gold', { anchorX: 0.5, anchorY: 0.5, x: 1220, // Align horizontally with stone y: 2660 // Position gold below the stone }); // Add text for gold score beside gold asset var goldScoreText = new Text2('0', { size: 70, fill: 0xffd700 }); gold.clickCount = 0; gold.down = function (x, y, obj) { gold.clickCount += 5; goldScoreText.setText(gold.clickCount); }; goldScoreText.anchor.set(1, 0.5); goldScoreText.x = gold.x - 90; // Position text to the left of the gold goldScoreText.y = gold.y; self.addChild(goldScoreText); var bronze = self.attachAsset('bronze', { anchorX: 0.5, anchorY: 0.5, x: 595, // Position bronze in the middle of the screen y: 2510 // Position bronze above the stone }); // Add text for bronze score beside bronze asset var bronzeScoreText = new Text2('0', { size: 70, fill: 0xcd7f32 }); bronze.clickCount = 0; bronze.down = function (x, y, obj) { bronze.clickCount += 5; bronzeScoreText.setText(bronze.clickCount); }; bronzeScoreText.anchor.set(1, 0.5); bronzeScoreText.x = bronze.x - 90; // Position text to the left of the bronze bronzeScoreText.y = bronze.y; self.addChild(bronzeScoreText); var crystal = self.attachAsset('crystal', { anchorX: 0.5, anchorY: 0.5, x: 595, // Align horizontally with bronze y: 2660 // Position crystal below the bronze }); // Add text for crystal score beside crystal asset var crystalScoreText = new Text2('0', { size: 70, fill: 0x00ffff }); crystal.clickCount = 0; crystal.down = function (x, y, obj) { crystal.clickCount += 5; crystalScoreText.setText(crystal.clickCount); }; crystalScoreText.anchor.set(1, 0.5); crystalScoreText.x = crystal.x - 90; // Position text to the left of the crystal crystalScoreText.y = crystal.y; self.addChild(crystalScoreText); }); var Page2 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background2' with the anchor point set to 0, 0 var background2 = self.attachAsset('background2', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); }); var Page3 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background3' with the anchor point set to 0, 0 var background3 = self.attachAsset('background3', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); }); var Page4 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background4' with the anchor point set to 0, 0 var background4 = self.attachAsset('background4', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); }); // Create a Page5 class by using the LK expand method to extend Container. var Page5 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background5' with the anchor point set to 0, 0 var background5 = self.attachAsset('background5', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); }); var Page6 = Container.expand(function () { var self = Container.call(this); // Get and automatically addChild to self asset with id 'background6' with the anchor point set to 0, 0 var background6 = self.attachAsset('background6', { anchorX: 0.0, anchorY: 0.0, x: 0, y: 0 }); }); var Tree = Container.expand(function (assetId, x, y) { var self = Container.call(this); var tree = self.attachAsset(assetId, { anchorX: -1.1, anchorY: 3, x: x, y: y }); tree.clickCount = 0; self.addChild(tree); self.getClickCount = function () { return tree.clickCount; }; self.incrementClickCount = function () { tree.clickCount += 1; }; self.hide = function () { tree.visible = false; }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ var tree1 = new Tree('tree1', 1000, 1366); var tree1_below = new Tree('tree1', 1000, 1966); tree1_below.lastX = tree1_below.x; tree1_below.lastY = tree1_below.y; var tree2 = new Tree('tree2', 1200, 1366); var tree2_below = new Tree('tree2', 1200, 1966); tree2_below.lastX = tree2_below.x; tree2_below.lastY = tree2_below.y; var tree3 = new Tree('tree3', 380, 1366); var tree3_below = new Tree('tree3', 380, 1966); tree3_below.lastX = tree3_below.x; tree3_below.lastY = tree3_below.y; self.addChild(tree3_below); var tree4 = new Tree('tree4', 100, 1366); var tree5 = new Tree('tree5', 1000, 1666); var tree6 = new Tree('tree6', 700, 1666); self.addChild(tree6); var tree7 = new Tree('tree7', 380, 1666); var tree8 = new Tree('tree8', 80, 1666); // Define tree8 var tree7TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree7TimerText.anchor.set(0.5, 0.5); tree7TimerText.x = tree7.x + 500; // Example position, adjust as needed tree7TimerText.y = tree7.y - 700; // Example position, adjust as needed tree7TimerText.visible = true; var tree3TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree3TimerText.anchor.set(0.5, 0.5); tree3TimerText.x = tree3.x + 500; // Example position, adjust as needed tree3TimerText.y = tree3.y - 700; // Example position, adjust as needed tree3TimerText.visible = true; var tree1TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree1TimerText.anchor.set(0.5, 0.5); tree1TimerText.x = 1500; // Example position, adjust as needed tree1TimerText.y = 500; // Example position, adjust as needed tree1TimerText.visible = true; var totalStatueScore = 0; // Initialize totalStatueScore to fix ReferenceError var woodScoreText = new Text2('0', { size: 70, fill: 0x471e00 }); woodScoreText.anchor.set(1, 0.5); var page = game.addChild(new Page0()); //{0.b} game.update = function () { // List of all trees var trees = [{ tree: tree1, timerText: tree1TimerText }, { tree: tree2, timerText: tree2TimerText }, { tree: tree3, timerText: tree3TimerText }, { tree: tree4, timerText: tree4TimerText }, { tree: tree5, timerText: tree5TimerText }, { tree: tree6, timerText: tree6TimerText }, { tree: tree7, timerText: tree7TimerText }, { tree: tree8, timerText: tree8TimerText }, { tree: tree1_below, timerText: tree1BelowTimerText }, { tree: tree2_below, timerText: tree2BelowTimerText }, { tree: tree3_below, timerText: tree3BelowTimerText }, { tree: tree4_below, timerText: tree4BelowTimerText }, { tree: tree5_below, timerText: tree5BelowTimerText }, { tree: tree6_below, timerText: tree6BelowTimerText }, { tree: tree7_below, timerText: tree7BelowTimerText }, { tree: tree8_below, timerText: tree8BelowTimerText }, { tree: tree1_below2, timerText: tree1Below2TimerText }, { tree: tree2_below2, timerText: tree2Below2TimerText }, { tree: tree3_below2, timerText: tree3Below2TimerText }, { tree: tree4_below2, timerText: tree4Below2TimerText }]; // Iterate over each tree trees.forEach(function (_ref) { var tree = _ref.tree, timerText = _ref.timerText; if (!tree.visible) { // If the tree is invisible, start a timer to make it visible after 30 seconds if (!tree.timerStarted) { tree.timerStarted = true; LK.setTimeout(function () { tree.visible = true; timerText.visible = false; tree.timerStarted = false; }, 30000); } } }); }; var tree2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree2TimerText.anchor.set(0.5, 0.5); tree2TimerText.x = 1200; // Example position, adjust as needed tree2TimerText.y = 500; // Example position, adjust as needed tree2TimerText.visible = true; tree1TimerText.visible = true; tree2TimerText.visible = true; var tree2BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree2BelowTimerText.anchor.set(0.5, 0.5); tree2BelowTimerText.x = 1200; // Example position, adjust as needed tree2BelowTimerText.y = 500; // Example position, adjust as needed tree2BelowTimerText.visible = true; var tree3Below2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree3Below2TimerText.anchor.set(0.5, 0.5); tree3Below2TimerText.x = 1260; // Example position, adjust as needed tree3Below2TimerText.y = 500; // Example position, adjust as needed tree3Below2TimerText.visible = true; tree2BelowTimerText.visible = true; var tree4Below2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree4Below2TimerText.anchor.set(0.5, 0.5); tree4Below2TimerText.x = 1260; // Example position, adjust as needed tree4Below2TimerText.y = 500; // Example position, adjust as needed tree4Below2TimerText.visible = true; var tree3BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree3BelowTimerText.anchor.set(0.5, 0.5); tree3BelowTimerText.x = 1260; // Example position, adjust as needed tree3BelowTimerText.y = 500; // Example position, adjust as needed tree3BelowTimerText.visible = true; var tree4TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree4TimerText.anchor.set(0.5, 0.5); tree4TimerText.x = 1260; // Example position, adjust as needed tree4TimerText.y = 500; // Example position, adjust as needed tree4TimerText.visible = true; var tree5TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree5TimerText.anchor.set(0.5, 0.5); tree5TimerText.x = 1260; // Example position, adjust as needed tree5TimerText.y = 500; // Example position, adjust as needed tree5TimerText.visible = true; var tree1BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree1BelowTimerText.anchor.set(0.5, 0.5); tree1BelowTimerText.x = 1260; // Example position, adjust as needed tree1BelowTimerText.y = 500; // Example position, adjust as needed tree1BelowTimerText.visible = true; var tree5BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree5BelowTimerText.anchor.set(0.5, 0.5); tree5BelowTimerText.x = 1260; // Example position, adjust as needed tree5BelowTimerText.y = 500; // Example position, adjust as needed tree5BelowTimerText.visible = true; var tree1Below2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree1Below2TimerText.anchor.set(0.5, 0.5); tree1Below2TimerText.x = 1260; // Example position, adjust as needed tree1Below2TimerText.y = 500; // Example position, adjust as needed tree1Below2TimerText.visible = true; var tree6TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree6TimerText.anchor.set(0.5, 0.5); tree6TimerText.x = 1260; // Example position, adjust as needed tree6TimerText.y = 500; // Example position, adjust as needed tree6TimerText.visible = true; var tree6BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree6BelowTimerText.anchor.set(0.5, 0.5); tree6BelowTimerText.x = 1260; // Example position, adjust as needed tree6BelowTimerText.y = 500; // Example position, adjust as needed tree6BelowTimerText.visible = true; var tree2Below2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree2Below2TimerText.anchor.set(0.5, 0.5); tree2Below2TimerText.x = 1260; // Example position, adjust as needed tree2Below2TimerText.y = 500; // Example position, adjust as needed tree2Below2TimerText.visible = true; var tree8TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree8TimerText.anchor.set(0.5, 0.5); tree8TimerText.x = 1260; // Example position, adjust as needed tree8TimerText.y = 500; // Example position, adjust as needed tree8TimerText.visible = true; var tree4BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree4BelowTimerText.anchor.set(0.5, 0.5); tree4BelowTimerText.x = 1260; // Example position, adjust as needed tree4BelowTimerText.y = 500; // Example position, adjust as needed tree4BelowTimerText.visible = true; var tree8BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree8BelowTimerText.anchor.set(0.5, 0.5); tree8BelowTimerText.x = 1260; // Example position, adjust as needed tree8BelowTimerText.y = 500; // Example position, adjust as needed tree8BelowTimerText.visible = true; tree4Below2TimerText.visible = true; var tree3BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree3BelowTimerText.anchor.set(0.5, 0.5); tree3BelowTimerText.x = 1260; // Example position, adjust as needed tree3BelowTimerText.y = 500; // Example position, adjust as needed var tree7BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree7BelowTimerText.anchor.set(0.5, 0.5); tree7BelowTimerText.x = 1260; // Example position, adjust as needed tree7BelowTimerText.y = 500; // Example position, adjust as needed var tree4TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree4TimerText.anchor.set(0.5, 0.5); tree4TimerText.x = 1260; // Example position, adjust as needed tree4TimerText.y = 500; // Example position, adjust as needed var tree5TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree5TimerText.anchor.set(0.5, 0.5); tree5TimerText.x = 1260; // Example position, adjust as needed tree5TimerText.y = 500; // Example position, adjust as needed var tree1BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree1BelowTimerText.anchor.set(0.5, 0.5); tree1BelowTimerText.x = 1260; // Example position, adjust as needed tree1BelowTimerText.y = 500; // Example position, adjust as needed var tree5BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree5BelowTimerText.anchor.set(0.5, 0.5); tree5BelowTimerText.x = 1260; // Example position, adjust as needed tree5BelowTimerText.y = 500; // Example position, adjust as needed var tree1Below2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree1Below2TimerText.anchor.set(0.5, 0.5); tree1Below2TimerText.x = 1260; // Example position, adjust as needed tree1Below2TimerText.y = 500; // Example position, adjust as needed var tree6TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree6TimerText.anchor.set(0.5, 0.5); tree6TimerText.x = 1260; // Example position, adjust as needed tree6TimerText.y = 500; // Example position, adjust as needed var tree6BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree6BelowTimerText.anchor.set(0.5, 0.5); tree6BelowTimerText.x = 1260; // Example position, adjust as needed tree6BelowTimerText.y = 500; // Example position, adjust as needed var tree2Below2TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree2Below2TimerText.anchor.set(0.5, 0.5); tree2Below2TimerText.x = 1260; // Example position, adjust as needed tree2Below2TimerText.y = 500; // Example position, adjust as needed var tree8TimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree8TimerText.anchor.set(0.5, 0.5); tree8TimerText.x = 1260; // Example position, adjust as needed tree8TimerText.y = 500; // Example position, adjust as needed var tree4BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree4BelowTimerText.anchor.set(0.5, 0.5); tree4BelowTimerText.x = 1260; // Example position, adjust as needed tree4BelowTimerText.y = 500; // Example position, adjust as needed var tree8BelowTimerText = new Text2('0:30', { size: 80, fill: 0x00ff00 }); tree8BelowTimerText.anchor.set(0.5, 0.5); tree8BelowTimerText.x = 1260; // Example position, adjust as needed tree8BelowTimerText.y = 500; // Example position, adjust as needed ; //{0.b}
===================================================================
--- original.js
+++ change.js
2D wreckage of wood, square, HD colors. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
House from the front facing the screen with big sign above it have description "SHOP", Hd colors
coin with colors, have "DA", hd colors. have black circles and black line for the "DA", between the 2 circles do small black lines all around. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Modern App Store icon, square with rounded corners, HD colors for a 2d game titled "The Collector" and with the description "about building houses and trees and decorations on a map to make it look like city, which then generate "DA" coins after a countdown timer expires. Players can collect these coins to increase their score, which they can then use to purchase more houses and trees and decorations from the shop button on the middle left side of the screen". with text on the middle top of the banner "the collector"!