Code edit (2 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'x')' in this line: 'self.presentText.x = 580;' Line Number: 22
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
change catchpresentDisplay to show name and image of present type asociated with name
User prompt
change catchpresentDisplay to show name and image of present type
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'y')' in this line: 'presentText.y = 0;' Line Number: 18
User prompt
Fix Bug: 'TypeError: Cannot set properties of undefined (setting 'y')' in this line: 'presentText.y = 0;' Line Number: 20
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'name')' in this line: 'var presentText = new Text2(self.catchPresentsList[randomIndex].name + ' - ' + self.catchPresentsList[randomIndex].type, {' Line Number: 11
User prompt
change catchPresentDisplay to display 1 random line from present list
Code edit (1 edits merged)
Please save this source code
User prompt
for each present caught reduce caughtpresent list by 1
User prompt
each time a present is removed update catchPresentdisplay
User prompt
display in list on left side of screen catchpresents. limit list to 5 lines
User prompt
for presentName assign a random name from namestore to each present created
User prompt
display on top left of screen a list of the assigned present names. limit list to 5 lines
User prompt
set displayname to display presentname based upon a random catchpresent index value
User prompt
Fix Bug: 'Uncaught ReferenceError: presentTypes is not defined' in this line: 'self.CatchPresents = presentTypes.map(function (type) {' Line Number: 535
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'type')' in this line: 'var presentType = self.CatchPresents[catchPresentIndex].type;' Line Number: 541
User prompt
change displaypresent so that it reads details from catchpresent array and displays present type and name
User prompt
create an array called CatchPresents that contains number of created presents with present type and a random assigned name from the name storage based upon current game level
User prompt
Fix Bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'updateName')' in this line: 'if (gameInstance) gameInstance.nameDisplay.updateName(randomName);' Line Number: 241
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of null (reading 'nameDisplay')' in this line: 'self.parent.nameDisplay.updateName(randomName);' Line Number: 230
User prompt
Fix Bug: 'Uncaught ReferenceError: nameDisplay is not defined' in this line: 'nameDisplay.updateName(randomName);' Line Number: 230
User prompt
Fix Bug: 'Uncaught ReferenceError: Level is not defined' in this line: 'var presentDisplay = self.addChild(new presentTypeDisplay(Level));' Line Number: 527
===================================================================
--- original.js
+++ change.js
@@ -1,22 +1,21 @@
var CatchPresentsDisplay = Container.expand(function () {
var self = Container.call(this);
self.x = 10;
self.y = 10;
- self.displayLimit = 12;
+ self.displayLimit = 14;
self.catchPresentsList = [];
self.updateList = function (catchPresents) {
self.catchPresentsList = catchPresents.slice(0, self.displayLimit);
self.removeChildren();
- for (var i = 0; i < self.catchPresentsList.length; i++) {
- var presentText = new Text2(self.catchPresentsList[i].name + ' - ' + self.catchPresentsList[i].type, {
- size: 30,
- fill: '#ffffff',
- font: 'Arial'
- });
- presentText.y = i * 35;
- self.addChild(presentText);
- }
+ var randomIndex = Math.floor(Math.random() * self.catchPresentsList.length);
+ var presentText = new Text2(self.catchPresentsList[randomIndex].name + ' - ' + self.catchPresentsList[randomIndex].type, {
+ size: 30,
+ fill: '#ffffff',
+ font: 'Arial'
+ });
+ presentText.y = 0;
+ self.addChild(presentText);
};
});
var PopupTextBox = Container.expand(function (message) {
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.