mirror of
https://github.com/Febbweiss/sis.git
synced 2026-03-05 06:35:37 +00:00
Bugfix: live management
This commit is contained in:
@@ -83,7 +83,6 @@ Game = {
|
|||||||
$(".shipShot").remove();
|
$(".shipShot").remove();
|
||||||
$("#life" + Game.ship.lives).remove();
|
$("#life" + Game.ship.lives).remove();
|
||||||
Game.running = false;
|
Game.running = false;
|
||||||
Game.ship.lives = Game.ship.lives - 1;
|
|
||||||
$("#hero").children().hide();
|
$("#hero").children().hide();
|
||||||
|
|
||||||
if( Game.ship.lives > 0 ) {
|
if( Game.ship.lives > 0 ) {
|
||||||
@@ -120,7 +119,6 @@ Game = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setShip : function() {
|
setShip : function() {
|
||||||
var type = SHIPS.scout;
|
|
||||||
Game.ship = new Ship("ship", {
|
Game.ship = new Ship("ship", {
|
||||||
x : $("#hero").x(),
|
x : $("#hero").x(),
|
||||||
y : $("#hero").y()
|
y : $("#hero").y()
|
||||||
|
|||||||
@@ -24,12 +24,6 @@ var PLAYGROUND_WIDTH = 448,
|
|||||||
|
|
||||||
START_Y = 40;
|
START_Y = 40;
|
||||||
|
|
||||||
var SHIPS = {
|
|
||||||
scout: {width: 30, height: 25},
|
|
||||||
bomber: {width: 30, height: 25},
|
|
||||||
cruser: {width: 30, height: 25}
|
|
||||||
};
|
|
||||||
|
|
||||||
var animations = WORLD.farm;
|
var animations = WORLD.farm;
|
||||||
|
|
||||||
function displayModal(data) {
|
function displayModal(data) {
|
||||||
@@ -137,9 +131,9 @@ $(function(){
|
|||||||
width: 100,
|
width: 100,
|
||||||
height: 32
|
height: 32
|
||||||
})
|
})
|
||||||
.addSprite("life3", animations.life)
|
.addSprite("life2", animations.life)
|
||||||
.addSprite("life2", $.extend({posx: 32}, animations.life))
|
.addSprite("life1", $.extend({posx: 32}, animations.life))
|
||||||
.addSprite("life1", $.extend({posx: 64}, animations.life))
|
.addSprite("life0", $.extend({posx: 64}, animations.life))
|
||||||
.end()
|
.end()
|
||||||
.addGroup("levelGrp", {
|
.addGroup("levelGrp", {
|
||||||
posx: PLAYGROUND_WIDTH - (6 * 32 + 16),
|
posx: PLAYGROUND_WIDTH - (6 * 32 + 16),
|
||||||
|
|||||||
Reference in New Issue
Block a user