User prompt
move the remaining bullet text to the bottom of the screen
User prompt
display on screen the remaining bullets to fire
User prompt
what a bullet is fired santa moves in the opposite direction
User prompt
when a bullet is fired change santas direction
User prompt
when santa fires a projectile change direction
User prompt
santa is pushed backwards for 2 secondswhen a projectile is fired
User prompt
make santa move backwards temporarily by 5 pixels when a projectile is shot
User prompt
make santa recoil when he shoots a projectile
User prompt
all enemy should vary in size when they are spawned
User prompt
when left click mouse is held down stop santa from moving for 1 second
User prompt
when left click is hold make santa change direction
User prompt
reduce santas movement speed
User prompt
everytime santa destroys an enemy increments santas movement speed by 1
User prompt
each bloodplatter spawned should vary in size
User prompt
delete blood splatter from the game space after 3 seconds
User prompt
after a 3 seconds delay delete the blood splatter
User prompt
delete the blood splatter after 3 seconds
User prompt
destroy the blood splatter after 2 seconds
User prompt
when an enemy is destroyed create a fake blood splatter
User prompt
make santa move faster
User prompt
destroy the enemy when they leave the screen
User prompt
when projectile leave the screen destroy them
User prompt
Santa can only have four projectiles on screen at the same time, if there is more than four santa cannot shoot
User prompt
double the spawn rate of enemy
User prompt
when score increases by 1, increase the speed of every enemy by 3
===================================================================
--- original.js
+++ change.js
@@ -18,24 +18,14 @@
var santaGraphics = self.createAsset('santa', 'Santa character', .5, .5);
santaGraphics.rotation = -Math.PI / 2;
self.direction = 1;
self.speed = 10;
- self.move = function (isMouseDown) {
- if (isMouseDown && !self.isStopped) {
- self.isStopped = true;
- LK.setTimeout(function () {
- self.isStopped = false;
- }, 1000);
- return;
- }
+ self.move = function () {
if (self.x >= 2048 - this.width / 2 || self.x <= this.width / 2) {
self.direction *= -1;
}
- if (!self.isStopped) {
- self.x += self.speed * self.direction;
- }
+ self.x += self.speed * self.direction;
};
- self.isStopped = false;
self.fire = function () {};
});
var Bullet = Container.expand(function () {
var self = Container.call(this);
@@ -46,9 +36,11 @@
};
});
var YellowEnemy = Container.expand(function () {
var self = Container.call(this);
+ var scale = 0.5 + Math.random() * 0.5;
var enemyGraphics = self.createAsset('yellowEnemy', 'Yellow Enemy character', .5, .5);
+ enemyGraphics.scale.set(scale, scale);
self.speed = 3;
self.move = function () {
self.y += self.speed;
if (self.y > 2732) {
@@ -57,9 +49,11 @@
};
});
var BlueEnemy = Container.expand(function () {
var self = Container.call(this);
+ var scale = 0.5 + Math.random() * 0.5;
var enemyGraphics = self.createAsset('blueEnemy', 'Blue Enemy character', .5, .5);
+ enemyGraphics.scale.set(scale, scale);
self.speed = 5;
self.move = function () {
self.y += self.speed;
if (self.y > 2732) {
@@ -68,9 +62,11 @@
};
});
var RedEnemy = Container.expand(function () {
var self = Container.call(this);
+ var scale = 0.5 + Math.random() * 0.5;
var enemyGraphics = self.createAsset('redEnemy', 'Red Enemy character', .5, .5);
+ enemyGraphics.scale.set(scale, scale);
self.speed = 8;
self.move = function () {
self.y += self.speed;
if (self.y > 2732) {
@@ -80,15 +76,8 @@
});
var Game = Container.expand(function () {
var self = Container.call(this);
var santa = self.addChild(new Santa());
- var isMouseDown = false;
- stage.on('down', function (obj) {
- isMouseDown = true;
- });
- stage.on('up', function (obj) {
- isMouseDown = false;
- });
var score = 0;
var scoreTxt = new Text2(score.toString(), {
size: 150,
fill: "#ffffff"
@@ -127,9 +116,9 @@
stage.on('down', function (obj) {
fireBullet();
});
LK.on('tick', function () {
- santa.move(isMouseDown);
+ santa.move();
bullets.forEach(function (bullet, bulletIndex) {
bullet.move();
if (bullet.y < -bullet.height) {
bullet.destroy();
a top view of a 16 bit sprite santa with a bazooka Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
16 bit sprite of a christmas ornament Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
16 bit sprite of a red eyed christmas elf Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
16 bit sprite of a blood splatter Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
16 bit sprite of a red eye reindeer Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
16 bit sprite of a red eye mother christmas Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
16 bit top view background of a christmas field set in hell Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
16 bit smoke Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
16 bit wall of skulls with red eyes Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
"Death Is Inevitable" Text Bubble Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
16 bit CHRISTMAS bomb power up icon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.