Skip to content

Commit

Permalink
screens
Browse files Browse the repository at this point in the history
  • Loading branch information
severest committed Dec 1, 2012
1 parent 786c62e commit eb2e095
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components.js
Expand Up @@ -220,9 +220,9 @@ Crafty.c("HardEnemy", {
.animate("go", 0, 0, 2)
.animate("go",30, 0)
.bind('AnimationEnd', function () {
this.destroy();
gameScore += this.scoreForKill;
this.destroy();
});
gameScore += this.scoreForKill;
this.destroy();
}
});
Expand Down
7 changes: 3 additions & 4 deletions game.js
Expand Up @@ -135,11 +135,10 @@ window.onload = function () {
.text("Score: 0")
.bind("EnterFrame", function () {
if (gameScore > gameScoreTxt) {
if (gameScore - gameScoreTxt > 10)
if (gameScore - gameScoreTxt > 10)
gameScoreTxt += 10;
else
gameScoreTxt += (gameScore - gameScoreTxt);
console.log(gameScore);
this.text("Score: " + gameScoreTxt);
}
});
Expand Down Expand Up @@ -263,7 +262,7 @@ function showInstructions() {

function spawnSimpleEnemy() {
Crafty.e("Enemy, 2D, DOM, egg, SpriteAnimation, SimpleEnemy")
.attr({ x: Crafty.math.randomInt(20, STAGE_WIDTH-20), y: -Crafty.math.randomInt(50, 500), z: 2})
.attr({ x: Crafty.math.randomInt(50, STAGE_WIDTH-50), y: -Crafty.math.randomInt(50, 500), z: 2})
.animate("idle", 0, 0, 3)
.animate("death", 4, 0, 8)
.animate("idle", 20, -1)
Expand All @@ -273,7 +272,7 @@ function spawnSimpleEnemy() {

function spawnMediumEnemy() {
Crafty.e("Enemy, 2D, DOM, onion, SpriteAnimation, MediumEnemy")
.attr({ x: Crafty.math.randomInt(20, STAGE_WIDTH), y: -Crafty.math.randomInt(50, 500), z: 2})
.attr({ x: Crafty.math.randomInt(50, STAGE_WIDTH-50), y: -Crafty.math.randomInt(50, 500), z: 2})
.animate("idle", 0, 0, 0)
.animate("blink", 0, 0, 8)
.animate("death", 8, 0, 13)
Expand Down
Binary file added imgs/screenshots/1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/screenshots/2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/screenshots/3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/screenshots/4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit eb2e095

Please sign in to comment.