mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixes the sending and rendering of game stats
This commit is contained in:
parent
cad112419d
commit
a66a327386
8 changed files with 81 additions and 62 deletions
|
|
@ -65,12 +65,12 @@ function (Parent, Nc) {
|
|||
|
||||
if(this.stats.health < 0) this.stats.health = 0;
|
||||
|
||||
this.broadcastStats();
|
||||
|
||||
if(this.stats.health <= 0) {
|
||||
if(enemy != this) enemy.score();
|
||||
this.kill(enemy, byItem);
|
||||
}
|
||||
|
||||
this.broadcastStats();
|
||||
};
|
||||
|
||||
Player.prototype.spawn = function(x, y) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue