Code edit (1 edits merged)
Please save this source code
User prompt
now in RightBoard.swipe(); move all the generator Buttons vertically depending on the swipe direction.
Code edit (5 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'swipe')' in or related to this line: 'self.swipe = function (deltaX, deltaY) {' Line Number: 1076
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'swipe')' in or related to this line: 'self.swipe = function (deltaX, deltaY) {' Line Number: 1076
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'swipe')' in or related to this line: 'self.swipe = function (deltaX, deltaY) {' Line Number: 1076
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'swipe')' in or related to this line: 'self.swipe = function (deltaX, deltaY) {' Line Number: 1076
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'swipe')' in or related to this line: 'self.swipe = function (deltaX, deltaY) {' Line Number: 1072
User prompt
OK. now on swipe, call a new function swipe() in RightBoard and the delta to it
User prompt
in GeneratorButton down event, differentiate between tap and swipe
Code edit (1 edits merged)
Please save this source code
User prompt
in the same way update : ``` rightBoard.generatorButtons[generatorId].children.forEach(function (child) { if (child instanceof Text2 && child.text !== generatorConfig.cost.toString()) { child.setText(self.generatorCounts[generatorId].toString()); } }); ``` for countText
User prompt
now update the lines : ``` rightBoard.generatorButtons[index].children.forEach(function (child) { if (child instanceof Text2) { child.setText(generatorConfig.cost.toString()); // Update the cost text to reflect the new exponential cost } }); ``` to use costText property
User prompt
Please fix the bug: 'costText is not defined' in or related to this line: 'costText.x = 45;' Line Number: 426
User prompt
Please fix the bug: 'countText is not defined' in or related to this line: 'countText.x = -buttonGraphics.width / 2 + 10;' Line Number: 423
User prompt
in GeneratorButton, make costText & countText public properties (self.costText & self.countText)
Code edit (1 edits merged)
Please save this source code
User prompt
in generator buttons add a new small text at top left corner to show the number of bought generators
Code edit (1 edits merged)
Please save this source code
User prompt
extract the '1.2' of Math.pow(1.2, currentCount + 1) into a property 'self.priceIncreaseRate' in ProgressManager
Code edit (1 edits merged)
Please save this source code
User prompt
now button show '0' instead of 'NaN', it's better but it's worng: it should be 10 then 10^1.2 then ....
Code edit (1 edits merged)
Please save this source code
User prompt
try to fix NaN written on gen buttons after a purchase
User prompt
make each generators cost exponentially depend on number of bought genrators and update the corresponding GeneratorButton text
===================================================================
--- original.js
+++ change.js
@@ -329,8 +329,16 @@
fill: 0x043515,
dropShadow: true,
align: 'center'
});
+ var countText = new Text2('0', {
+ size: 30,
+ fill: 0xFFFFFF,
+ align: 'left'
+ });
+ countText.x = -buttonGraphics.width / 2 + 10;
+ countText.y = -buttonGraphics.height / 2 + 10;
+ self.addChild(countText);
costText.x = 45;
costText.y = 75;
self.visible = false;
self.addChild(costText);
@@ -884,9 +892,14 @@
log("Updating costs - Base:", baseCost, "Count:", currentCount, "New Cost:", newCost);
// Update costs
generatorConfig.cost = newCost;
rightBoard.generatorButtons[generatorId].config.cost = newCost;
- self.generatorCounts[generatorId]++; // Increment the count for the generator
+ self.generatorCounts[generatorId]++; // Increment the count for the generator
+ rightBoard.generatorButtons[generatorId].children.forEach(function (child) {
+ if (child instanceof Text2 && child.text !== generatorConfig.cost.toString()) {
+ child.setText(self.generatorCounts[generatorId].toString());
+ }
+ });
log("Generator", generatorId, "Count:", self.generatorCounts[generatorId], "New Cost:", newCost);
LK.getSound('buyGenerator').play();
return true;
};
a big lovely heart
a big stone heart
a big used copper heart
face view of a big bronze heart
face view of a big silver heart
Big shining gold heart verly slightly ornate. face view.
Big precious shiny porcelain heart slightly ornate. face view.
Large precious heart in mother-of-pearl, lightly ornate. Front view.
Large heart in precious ruby, very lightly decorated. Front view.
The most precious large heart in diamond, Front view.
clean pink enamel board witha very thin border