User prompt
Fix Bug: 'ReferenceError: presentDisplay is not defined' in this line: 'if (presentType === presentDisplay.getCurrentPresentType()) {' Line Number: 263
User prompt
Fix Bug: 'ReferenceError: presentDisplay is not defined' in this line: 'if (presentType === presentDisplay.getCurrentPresentType()) {' Line Number: 263
User prompt
Fix Bug: 'Uncaught ReferenceError: presentTypeIndex is not defined' in this line: 'var displayGraphic = self.createAsset(presentTypes[presentTypeIndex], presentTypes[presentTypeIndex] + ' Graphics', -0.2, -0.2);' Line Number: 177
User prompt
if storePresentTypeDetails matches presentType then reduce life by 1
User prompt
When a present in the main container is clicked store the present type details
User prompt
Fix Bug: 'TypeError: self.applyMovement is not a function' in this line: 'self.applyMovement();' Line Number: 206
User prompt
when present is selected capture present type and compare it to presentTypedisplay. If they dont match reduce life by one and refresh life counter
User prompt
Update the LifeCounter class to refresh life display when a life is removed Add a new method refreshLifeDisplay in LifeCounter class to update the life icons display
User prompt
when life updated refresh life display
User prompt
in game when present is selected refresh life counter
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'removeLife')' in this line: 'gameInstance.lifeCounter.removeLife();' Line Number: 200
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'currentPresentType')' in this line: 'if (self.assetId === gameInstance.presentTypeDisplay.currentPresentType) {' Line Number: 196
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'currentPresentType')' in this line: 'if (self.assetId === gameInstance.presentDisplay.currentPresentType) {' Line Number: 196
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'currentPresentType')' in this line: 'if (self.assetId === gameInstance.presentTypeDisplay.currentPresentType) {' Line Number: 196
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'currentPresentType')' in this line: 'if (self.assetId === gameInstance.presentDisplay.currentPresentType) {' Line Number: 196
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'currentPresentType')' in this line: 'if (self.assetId === presentDisplay.currentPresentType) {' Line Number: 196
User prompt
detect when present click on to see if a match to presentdisplay type. if a match then remove selected present. if not a match remove a life and the present.
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: self.parent.parent.getChildByName is not a function' in this line: 'var lifeCounter = self.parent.parent.getChildByName('LifeCounter');' Line Number: 193
User prompt
change present code so that it checks the present clicked on against current presentdisplay type. If they match the remove selected present. If they do not match then minus 1 life
User prompt
modify present selection code so if wrong type is selected it removes a present but if right type selected it allows you to carry on selecting presents
User prompt
Fix Bug: 'TypeError: LK.stageContainer.getChildByName is not a function' in this line: 'var lifeCounter = LK.stageContainer.getChildByName('LifeCounter');' Line Number: 193
User prompt
if presenttype selected does not matches presentDisplaytype then reduce lives by one
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'height')' in this line: 'if (self.y > mainContainer.height - self.height) {' Line Number: 231
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'width')' in this line: 'var mainContainerWidth = self.parent.width;' Line Number: 222
===================================================================
--- original.js
+++ change.js
@@ -192,9 +192,9 @@
self.interactive = true;
self.on('down', function (obj) {
var gameInstance = self.parent.parent;
var presentDisplay = gameInstance.presentDisplay;
- if (self.assetId === gameInstance.presentTypeDisplay.currentPresentType) {
+ if (self.assetId === gameInstance.presentDisplay.currentPresentType) {
self.destroy();
gameInstance.presents.splice(gameInstance.presents.indexOf(self), 1);
} else {
gameInstance.lifeCounter.removeLife();
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.