User prompt
bonuseg spawns when player reaches 400 points again and again
User prompt
bonuseg spawns when player reaches 400...+400...+400
User prompt
bonuseg spawns every 400 points
User prompt
fix bonuseg
User prompt
'bonuseg' fall every 500 score points and give protection against of loss life
User prompt
Please fix the bug: 'ReferenceError: protectionTimer is not defined' in or related to this line: 'if (protectionTimer > 0) {' Line Number: 286
User prompt
remove bonusegg and protection
User prompt
rename bonus to bonusegg
User prompt
bonus gives protection against loss of life
User prompt
add bonus that fall every 500 points and give shield for 15 second
User prompt
fix rottenegg takes one life
User prompt
fix rottenegg
User prompt
add heat when lose life
Code edit (1 edits merged)
Please save this source code
User prompt
play music at the start and repeat to game over
User prompt
play music when game starts
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'y')' in or related to this line: 'if (goldenEggs[i].y > 2732) {' Line Number: 257
User prompt
repeat music to game over
User prompt
add music to the main sound theme
User prompt
wolf become red when lose life
User prompt
replace chiken some lower
User prompt
replace chicken some lower
User prompt
replace three chicken to the center
User prompt
add three chicken at background
User prompt
remove leaderboards
===================================================================
--- original.js
+++ change.js
@@ -133,8 +133,9 @@
var rottenEggs = [];
var goldenEggs = [];
var livesArray = [];
var score = 0;
+var lastBonusScore = 0;
var lives = 3;
var bonusEggs = [];
var protectionTimer = 0;
// Display score
@@ -199,14 +200,15 @@
newGoldenEgg.y = -50;
goldenEggs.push(newGoldenEgg);
game.addChild(newGoldenEgg);
}
- if (score != 0 && score % 400 == 0) {
+ if (score != 0 && score % 400 == 0 && score != lastBonusScore) {
var newBonusEgg = new BonusEgg();
newBonusEgg.x = Math.random() * 2048;
newBonusEgg.y = -50;
bonusEggs.push(newBonusEgg);
game.addChild(newBonusEgg);
+ lastBonusScore = score;
}
if (score != 0 && score % 100 == 0 && livesArray.length < 3) {
var newLive = new Live();
newLive.x = Math.random() * 2048;
Cartoon wolf. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon egg. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon rotten egg. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon golden egg. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon egg with big heart. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon scared chicken. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon bonus egg. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.