Code edit (5 edits merged)
Please save this source code
User prompt
refersh level indicator when level changes
User prompt
add in game class current level indicator text
Code edit (1 edits merged)
Please save this source code
User prompt
dd level indicator to game
Code edit (1 edits merged)
Please save this source code
User prompt
when level changes chack update level and presentTypescount before running createPresents
User prompt
hen level changes update current level
User prompt
hen get next level is called increase level by 1
User prompt
dd text under life indicator to show current level
User prompt
add text to display current level
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'presentSpeedFactor')' in this line: 'var presentSpeedFactor = level.presentSpeedFactor;' Line Number: 246
User prompt
Fix Bug: 'Uncaught RangeError: Maximum call stack size exceeded' in this line: 'var level = LevelManager.getCurrentLevel();' Line Number: 335
User prompt
Fix Bug: 'Uncaught RangeError: Maximum call stack size exceeded' in this line: 'var level = LevelManager.getCurrentLevel();' Line Number: 335
User prompt
Fix Bug: 'Uncaught RangeError: Maximum call stack size exceeded' in this line: 'var level = self.levelManager.getCurrentLevel();' Line Number: 335
User prompt
Fix Bug: 'Uncaught ReferenceError: currentLevel is not defined' in this line: 'var level = currentLevel;' Line Number: 335
User prompt
add level text to screen below life counter
User prompt
make sure self.present array is being updated every time a present is removed
User prompt
when main container empty of presents then start next level
User prompt
when main container empty of presents then move to next level
User prompt
if all present types have been removed then new level
User prompt
if lives are zero then end game
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'height')' in this line: 'if (self.y > mainContainer.height - self.height) {' Line Number: 243
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'width')' in this line: 'if (self.x > mainContainer.width - self.width) {' Line Number: 235
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'removeLife')' in this line: 'gameInstance.lifeCounter.removeLife();' Line Number: 214
===================================================================
--- original.js
+++ change.js
@@ -100,19 +100,8 @@
lifeIcon.x = 1948 - i * (lifeIcon.width + 10);
lifeIcon.y = 75;
self.lifeIcons.push(lifeIcon);
self.addChild(lifeIcon);
- self.levelText = new Text2('Level ' + LevelManager.getCurrentLevel(), {
- size: 40,
- fill: '#ffffff',
- anchor: {
- x: 0.5,
- y: 0
- }
- });
- self.levelText.x = 1024;
- self.levelText.y = 150;
- LK.gui.addChild(self.levelText);
}
self.removeLife = function () {
if (self.lives > 0) {
self.lives--;
@@ -130,9 +119,8 @@
self.lifeIcons.push(lifeIcon);
self.addChild(lifeIcon);
}
self.lives = initialLives;
- self.levelText.setText('Level ' + LevelManager.getCurrentLevel());
};
});
var NameDisplay = Container.expand(function () {
var self = Container.call(this);
basic snowflake. white Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
open top of Santa's sack. wrapped presents with ribbons and box, vivid colours, candy canes Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
close up of a Snow covered roof, Winter scene, star lit night sky, brick chimbly on right hand side, Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stary night sky.dark blue. no land. only sky Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Candy cane, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, vivid colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
old paper scroll, blank with no writing, Single Game Texture. In-Game asset. 2d. transparent Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
rudolf the red nose raindeer Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
gift wrapped box, bright colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture.
gift wrapped box, bright light colours. with bow on top Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows. Single Game Texture.
Santa's sleigh with a team of reindeer moving across a star light sky. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.