User prompt
Fix Bug: 'ReferenceError: Mistletoe is not defined' in this line: 'if (child instanceof Snowflake) {' Line Number: 264
User prompt
make a copy of mistletoe and call it 'reindeer' reindeer does not bob up and down, instead it moves in an arc from left to right or right to left of the screen
User prompt
scale random text down by 20%
User prompt
randomtext has 10% instead of 25%
User prompt
make sure the respawned hearts at where the initially created hearts are
User prompt
heart.x = 1125+ i * (heart.width + 5);
User prompt
heart.x = 1150 + i * (heart.width + 5);
User prompt
heart.x = 1100 + i * (heart.width + 5);
User prompt
reduce the space between hearts
User prompt
6 hearts instead of 3
User prompt
text.y = y + 175;
User prompt
text.y = y + 150;
User prompt
text.x = x - 400;
User prompt
"Nice!" text = white
User prompt
change the special text to red
User prompt
move random text display a bit down
User prompt
move random text display a bit down
User prompt
move randomtext display to the left
User prompt
randomText.display on top of santa
User prompt
randomText.display x = 2150 y= 2750
User prompt
randomText.display(2248 / 2, 2732 / 2, messages);
User prompt
if one random text is active cannot instantiate a second one
User prompt
if move barn down is equal to true then there is a 25% chance that text will appear for 3 seconds and say either "Santa's special delivery!" or "This is for the naughty list!" or "Ho, ho, ho-hold this!"
User prompt
Adjust mistletoe spawning or respawning to avoid it being too close to the bottom of the screen
User prompt
make sure refilled hearts are created at the same position as hearts are created initially
===================================================================
--- original.js
+++ change.js
@@ -1,4 +1,22 @@
+var RandomText = Container.expand(function () {
+ var self = Container.call(this);
+ self.display = function (x, y, messages) {
+ var message = messages[Math.floor(Math.random() * messages.length)];
+ var text = new Text2(message, {
+ size: 60,
+ fill: '#ffffff',
+ font: 'Arial Black'
+ });
+ text.x = x;
+ text.y = y;
+ text.anchor.set(0.5, 0.5);
+ self.addChild(text);
+ LK.setTimeout(function () {
+ text.destroy();
+ }, 3000);
+ };
+});
var Mistletoe = Container.expand(function () {
var self = Container.call(this);
var mistletoeGraphics = self.createAsset('mistletoe', 'Mistletoe', 0.5, 0.5);
var bobbingRange = 10;
@@ -150,8 +168,14 @@
crateBackground.y += 100;
missBackground.y += 460;
tireBackground.y += 100;
barnMovedDown = true;
+ if (Math.random() < 0.25) {
+ var messages = ["Santa's special delivery!", "This is for the naughty list!", "Ho, ho, ho-hold this!"];
+ var randomText = new RandomText();
+ randomText.display(2048 / 2, 2732 / 2, messages);
+ self.addChild(randomText);
+ }
}
var heart = hearts.pop();
heart.destroy();
}
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