Code edit (8 edits merged)
Please save this source code
User prompt
about the main BigHeart : when score decrease the system with the 6 frames per heart type based on alpha is broken. This requires a deep analysis to find a way that doesn't break current gameplay
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER) - BigInt(1);' Line Number: 1019
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER) - BigInt(1n);' Line Number: 1019
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER) - BigInt(1);' Line Number: 1019
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER) - BigInt(1n);' Line Number: 1019
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER) - BigInt(1);' Line Number: 1019
User prompt
Please fix the bug: 'Cannot mix BigInt and other types, use explicit conversions' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER - 1n);' Line Number: 1019
User prompt
Please fix the bug: 'BigInt is not a function' in or related to this line: 'var tapCount = BigInt(MAX_DISPLAY_NUMBER - 1);' Line Number: 1019
User prompt
use BigInt for tapCount and money
Code edit (1 edits merged)
Please save this source code
User prompt
10000000000 => 10 Q : still wrong it shoud be 10000000000 => 10 B Analyze deeply and fix
Code edit (15 edits merged)
Please save this source code
User prompt
when taps is 10000000000 formatTapCount returns 10000000 B" : it's wrong, it should be 10 B
User prompt
currently format function gives : 10000000 => 10000000.000 B it should display non significative zeros
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
when spawning a gift, set a random rotation winthin a range of -PI/4 +PI/4
Code edit (18 edits merged)
Please save this source code
User prompt
in GiftRain, when a gift moves out of bounds move it back to gift.x = Math.random() * (1948 - 100) + 100; gift.y = -300; // Start above the screen in order to make a countious anim
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
I don't see gifts falling; I thing activesGifts are not atteched to the GiftRain instance in the GiftRain class
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -363,11 +363,11 @@
return;
} // Prevent interaction during animation
log("Generator button pressed", y);
globalStartY = y;
- dragNode = rightBoard;
self.startTime = Date.now();
self.startX = x;
+ dragNode = rightBoard;
};
self.up = function (x, y, obj) {
if (isSwipingButtons) {
dragNode = null;
@@ -467,28 +467,29 @@
self.generatorCount = 0;
// Initialize gift pool
for (var i = 0; i < 50; i++) {
var gift = new RainDrop();
- gift.updateAsset(self.generatorCount);
+ gift.updateAsset(0);
gift.speed = Math.random() * 2 + 1; // Random speed for each gift
+ gift.visible = true; //false; // Start invisible
+ self.addChild(gift); // Add to container immediately
self.giftPool.push(gift);
}
// Function to spawn a gift
- self.spawnGift = function () {
+ self.spawnGift = function (generatorId) {
log("Spawning gift. Active gifts count: ", self.activeGifts.length);
if (self.giftPool.length > 0) {
var gift = self.giftPool.pop();
- gift.x = Math.random() * (1948 - 100) + 100;
- gift.y = Math.random() * (-300 + 100) - 300;
+ gift.x = 1024; //Math.random() * (1948 - 100) + 100;
+ gift.y = 1366; ///-300; // Start above the screen
gift.visible = true;
+ gift.updateAsset(generatorId); // Update asset when spawning
self.activeGifts.push(gift);
- self.addChild(gift);
log("Gift spawned at position: ", gift.x, gift.y);
}
};
// Update function to move gifts
self.update = function () {
- //log("Updating active gifts. Count: ", self.activeGifts.length);
for (var i = self.activeGifts.length - 1; i >= 0; i--) {
var gift = self.activeGifts[i];
gift.y += gift.speed;
if (gift.y > 3000) {
@@ -499,12 +500,13 @@
}
}
};
// Function to increase gift spawn rate
- self.increaseSpawnRate = function () {
+ self.increaseSpawnRate = function (generatorId) {
self.generatorCount++;
+ log("Increasing spawn rate. Generator count: ", self.generatorCount);
for (var i = 0; i < self.generatorCount; i++) {
- self.spawnGift();
+ self.spawnGift(generatorId);
}
};
});
// Create a class for Projections
@@ -923,9 +925,9 @@
game.addChild(foregroundContainer);
var background = new Background(); // Create a Background instance
backgroundContainer.addChild(background); // Add Background instance to the backgroundContainer
var giftRain = new GiftRain();
-middlegroundContainer.addChild(giftRain); // Attach GiftRain to middlegroundContainer for visibility
+//middlegroundContainer.addChild(giftRain); // Attach GiftRain to middlegroundContainer for visibility
var isDebug = true;
var projectionsManager = backgroundContainer.addChild(new Projections()); // Place projectionsManager in backgroundContainer
function log() {
if (isDebug) {
@@ -934,9 +936,9 @@
}
// Declare maxGenerators as a global variable
var maxGenerators = 2;
// Declare tapCount as a global variable
-var tapCount = 0;
+var tapCount = 90;
// Create a text object to display tapCount
var tapCountText = new Text2('LOVE\r\n ', {
size: 140,
fill: 0xFFFFFF,
@@ -952,8 +954,14 @@
middlegroundContainer.addChild(bigHeart);
// Add a RightBoard instance to the foreground container
var rightBoard = new RightBoard();
foregroundContainer.addChild(rightBoard);
+foregroundContainer.addChild(giftRain); // TEMP DEBUG
+var rd = new RainDrop();
+rd.updateAsset(0);
+rd.x = 1024;
+rd.y = 1366;
+foregroundContainer.addChild(rd); // TEMP DEBUG
// Update the tapCountText whenever tapCount changes
function updateTapCountText() {
tapCountText.setText('LOVE\r\n' + tapCount);
}
@@ -1145,9 +1153,9 @@
self.generatorCounts[generatorId]++; // Increment the count for the generator
rightBoard.generatorButtons[generatorId].countText.setText(self.generatorCounts[generatorId].toString());
log("Generator", generatorId, "Count:", self.generatorCounts[generatorId], "New Cost:", newCost);
LK.getSound('buyGenerator').play();
- giftRain.increaseSpawnRate();
+ giftRain.increaseSpawnRate(generatorId);
return true;
};
self.buyUpgrade = function (upgradeId, generatorId) {
var upgradeConfig = Object.values(UPGRADES).find(function (u) {
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