Code edit (11 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'scoreText')' in this line: 'self.scoreDisplay.scoreText.anchor.set(.5, 0);' Line Number: 476
User prompt
Fix Bug: 'Uncaught ReferenceError: scoreTxt is not defined' in this line: 'scoreTxt.anchor.set(.5, 0);' Line Number: 476
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'setText')' in this line: 'scoreTxt.setText(gameInstance.score);' Line Number: 220
Code edit (1 edits merged)
Please save this source code
User prompt
in present graphics check to see if the clicked present type matches the catchdisplayedpresent type shown. if so delete clicked present and add 1 to score. if not delete a life
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'type')' in this line: 'var currentDisplayType = randomIndex < gameInstance.catchPresentsDisplay.catchPresentsList.length ? gameInstance.catchPresentsDisplay.catchPresentsList[randomIndex].type : null;' Line Number: 217
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'type')' in this line: 'var currentDisplayType = gameInstance.catchPresentsDisplay.catchPresentsList[randomIndex].type;' Line Number: 217
User prompt
remove presenttypedisplay code
User prompt
remove NameDsiplay code
User prompt
Fix Bug: 'ReferenceError: randomIndex is not defined' in this line: 'var currentDisplayType = gameInstance.catchPresentsDisplay.catchPresentsList[randomIndex].type;' Line Number: 276
User prompt
change currentDisplayType variable to equal the currentcatchPresentDisplay asset displayed
User prompt
change currentDisplayType variable to equal the currentcatchPresentDisplay asset type
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'if (presentAsset && presentAsset.textureCacheIds[0] === selectedPresent.assetId) {' Line Number: 13
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading '0')' in this line: 'if (presentAsset.textureCacheIds[0] === selectedPresent.assetId) {' Line Number: 13
User prompt
Check if the presentGraphics matches the presentAsset in the CatchPresentsDisplay list
Code edit (5 edits merged)
Please save this source code
User prompt
in presentgraphic compare to presentasset in catchPresentdsiplay to see if they match
User prompt
in present change the comparision of to look at the current displayed actchpresenttype for the comparison
User prompt
In present change code so that comparision of present type is carried out against catchpresenttype instead of currentpresenttype
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Timeout.tick error: nameDisplay.updateName is not a function' in this line: 'nameDisplay.updateName(nameStorage[Math.floor(Math.random() * nameStorage.length)]);' Line Number: 497
User prompt
Fix Bug: 'Uncaught TypeError: nameDisplay.updateName is not a function' in this line: 'nameDisplay.updateName(randomName);' Line Number: 256
User prompt
Fix Bug: 'Uncaught TypeError: nameDisplay.updateName is not a function' in this line: 'nameDisplay.updateName('');' Line Number: 496
Code edit (8 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -9,9 +9,9 @@
var randomIndex = Math.floor(Math.random() * self.catchPresentsList.length);
if (self.catchPresentsList.length > 0) {
var selectedPresent = self.catchPresentsList[randomIndex];
var presentAsset = self.createAsset(selectedPresent.type, selectedPresent.type + ' Graphics', 0.5, 0.5);
- if (presentAsset && presentAsset.textureCacheIds[0] === selectedPresent.assetId) {
+ if (presentAsset && presentAsset.textureCacheIds && presentAsset.textureCacheIds.length > 0 && presentAsset.textureCacheIds[0] === selectedPresent.assetId) {
presentAsset.x = self.width / 2 + 350;
presentAsset.y = 145;
} else {
console.error('Mismatch between present graphics and asset list.');
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.