Code edit (2 edits merged)
Please save this source code
User prompt
set displaylimit in createPresentDisplay to numPresentsToCreate value each time level changes
User prompt
in game code add a variable that captures the current catchpresentDisplay value that can be used for comparison to presents that have been clicked
Code edit (15 edits merged)
Please save this source code
User prompt
set displayedPresentType so its equal to the current catchPresentDisplay Present asset value
Code edit (1 edits merged)
Please save this source code
User prompt
in catchPresentDisplay for displaylimit count number presents created based upon level of game
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'length')' in this line: 'self.displayLimit = self.catchPresentsList.length;' Line Number: 5
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught ReferenceError: catchPresentsList is not defined' in this line: 'self.catchPresentsList = catchPresents.slice(0, catchPresentsList.length);' Line Number: 7
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
===================================================================
--- original.js
+++ change.js
@@ -2,9 +2,8 @@
var self = Container.call(this);
self.x = 10;
self.y = 10;
self.catchPresentsList = [];
- self.catchPresentsList = [];
self.updateList = function (catchPresents) {
self.catchPresentsList = catchPresents.slice(0, self.displayLimit);
var gameInstance = this.parent;
gameInstance.currentCatchPresent = self.catchPresentsList.length > 0 ? self.catchPresentsList[0] : null;
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.