User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'intersects')' in or related to this line: 'if (child instanceof Magic && blastWave.intersects(child)) {' Line Number: 764
User prompt
any idea why blastwave sometimes does not correctly destroy elf bullets or magic
Code edit (1 edits merged)
Please save this source code
User prompt
also blast snd_blastwave when blastwave is instantiated
User prompt
blastwave has to be scale larger than the playspace before its destroyed
User prompt
blastwave has to be scale larger than the playspace
User prompt
scale blastwave over 2 seconds not 1
User prompt
scale blastwave by 5000% not 500
User prompt
make sure blastwave is 50% transparent
User prompt
make sure blastwave is 60% transparent
User prompt
make sure blastwave is 80% transparent
User prompt
also instantiate blastwave in the center of santa and after 1 second scale it by 500% and destroy it
User prompt
do it
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'addChild')' in or related to this line: 'this.parent.addChild(tingText);' Line Number: 170
User prompt
When `barnMovedDown` is set to `false` destroy all elf bullets on screen
User prompt
if elf bullet collides with barn, destroy elf bullet
User prompt
if barn moved down is set to false and elf bullet collides with barn, destroy elf bullet and trigger a ricochet sound
User prompt
if barn moved down is set to false and elf bullet collides with barn, destroy elf bullet and trigger a ricochet sound
User prompt
if barn moved down is set to false and elf bullet collides with hit, destroy elf bullet and trigger a ricochet sound
User prompt
if barn moved down is set to true and santa is hit trigger the game over
User prompt
if barn moved down is set to false, santa should be invicinble and anything that hits him should ricochet extremely quick outside of the screen and destroy itself
User prompt
include a check that makes sure that barn moved down equal to true in order to trigger a game over, else destroy whatever hits santa
User prompt
before triggering game over, include a check that makes sure that barn moved down equal to true
User prompt
Show the cross hair momentarily don't leave it there in screen for too long
===================================================================
--- original.js
+++ change.js
@@ -351,9 +351,9 @@
var santaX = this.santa && this.santa.santaGraphics ? this.santa.santaGraphics.x : 0;
var santaY = this.santa.santaGraphics.y;
var distance = Math.sqrt(Math.pow(magic.x - santaX, 2) + Math.pow(magic.y - santaY, 2));
var hitThreshold = (this.santa.santaGraphics.width + magic.width) / 4;
- if (distance <= hitThreshold) {
+ if (distance <= hitThreshold && this.barnMovedDown) {
this.triggerGameOver();
magic.destroy();
this.activeMagicCount--;
}
over the shoulder santa firing a revolver Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d transparent christmas crosshair Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d 3rd person front view of a christmas town square with a starry sky Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Christmas sparkles png Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
circular christmas golden star pattern transparent png Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d christmas brick wall Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d opened christmas crate Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d diagonal christmas car or truck in snow Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a christmas poster showcasing miss santa clause Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a single white snowflake Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d stacked christmas winter tire Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d stacked christmas winter tire Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d christmas magical mistletoe Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d christmas 357 Magnum bullets Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d silhouette of a flying reindeer with a red glowy nose Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d christmas dark sparkles Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
2d christmas evil robot elf with a gun 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.
2d pile of gray and red nuts and bolts Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
transparent snow sphere. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
snd_pistol
Sound effect
snd_enemyshot
Sound effect
snd_obstacle
Sound effect
snd_messages
Sound effect
snd_ricochet
Sound effect
snd_reindeer
Sound effect
snd_mistletoe
Sound effect
snd_reindeershot
Sound effect
snd_mistletoeshot
Sound effect
snd_christmasmusic
Music
snd_reload
Sound effect
snd_blastwave
Sound effect