User prompt
The correct approach would be to place the event listener for the 'down' event outside of the tick event handler, ensuring it is added only once during the initialization of the game. This would allow the game to correctly listen for clicks or taps on Santa and trigger the present drop as expected.
User prompt
Fix Bug: 'TypeError: santa.containsPoint is not a function' in this line: 'if (santa.containsPoint(localPos)) {' Line Number: 202
User prompt
when user click on santa it should shot a present
User prompt
remove auto shot\
User prompt
improve collision so that there is not so much space when collision happens
User prompt
Fix Bug: 'TypeError: this.throwPresent is not a function' in this line: 'this.throwPresent();' Line Number: 199
User prompt
drop present when player click on top of santa
User prompt
remove automatic present drop
User prompt
move santa on swipe. it sshould move until where the finger stops contact
User prompt
throw gift on click
User prompt
stop automatic gift drop on tick
User prompt
swipe to move santa
User prompt
change automatic present drop to on click
User prompt
on click drop only 1 present
User prompt
swipe to move santa and click to drop presents
User prompt
moves score text 5 pixels down
User prompt
move score text 10 pixels down
Code edit (1 edits merged)
Please save this source code
User prompt
change score font to press start p2
User prompt
reduce score bg height by 100 px
User prompt
move scrorebg 30 pixels right
User prompt
moves score bg 400 pixels left
User prompt
move scrobg 500 pixels left
User prompt
show scorebg next to score
User prompt
show scorebg on tick
===================================================================
--- original.js
+++ change.js
@@ -176,9 +176,10 @@
scoreBackground.y = 0;
self.addChild(scoreBackground);
var scoreTxt = new Text2('0', {
size: 150,
- fill: "#ffffff"
+ fill: "#ffffff",
+ font: "'Press Start P2'"
});
self.presentIcons = [];
for (var i = 0; i < santa.presentCounter; i++) {
var presentIcon = new PresentIcon();
8-bit cloud with lightning. in game asset. white cloude. yellow lighning. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8 bit x mas pressent. in game asset. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit. cartoon. santa on sledge. smiling. in game asset. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.