Skip to content

Commit

Permalink
управление мышью
Browse files Browse the repository at this point in the history
  • Loading branch information
ershov-konst committed Oct 27, 2013
1 parent a45efd4 commit 6c54aee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
};

Game.prototype.mouseFire = function(id, x, y){
console.log("fire! x : " + x + " y : " + y );
gameInst.fire(id, {x : x, y : y});
};

Expand All @@ -71,8 +72,8 @@
ChangeWind(data.wind);
}

this.players["player1"] = this.players["player1"] || new Player(0, data["player1"].name, 3, gameInst.mouseFire());
this.players["player2"] = this.players["player2"] || new Player(1, data["player2"].name, 3, gameInst.mouseFire());
this.players["player1"] = this.players["player1"] || new Player(0, data["player1"].name, 3, gameInst.mouseFire);
this.players["player2"] = this.players["player2"] || new Player(1, data["player2"].name, 3, gameInst.mouseFire);

this.players["player1"].setHP(data["player1"].hp);
this.players["player2"].setHP(data["player2"].hp);
Expand Down

0 comments on commit 6c54aee

Please sign in to comment.