mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
replaced NotificationCenter with Nc
This commit is contained in:
parent
da913c4709
commit
672a46efa8
35 changed files with 160 additions and 161 deletions
|
|
@ -3,7 +3,7 @@ define([
|
|||
"Lib/Utilities/NotificationCenter"
|
||||
],
|
||||
|
||||
function (Parent, NotificationCenter) {
|
||||
function (Parent, Nc) {
|
||||
|
||||
function Player(id, physicsEngine) {
|
||||
Parent.call(this, id, physicsEngine);
|
||||
|
|
@ -43,7 +43,7 @@ function (Parent, NotificationCenter) {
|
|||
options.action = "throw";
|
||||
options.x = x;
|
||||
options.y = y;
|
||||
NotificationCenter.trigger("broadcastGameCommand", "handActionResponse", options);
|
||||
Nc.trigger("broadcastGameCommand", "handActionResponse", options);
|
||||
}
|
||||
} else {
|
||||
// grab
|
||||
|
|
@ -51,7 +51,7 @@ function (Parent, NotificationCenter) {
|
|||
this.grab(item);
|
||||
|
||||
options.action = "grab";
|
||||
NotificationCenter.trigger("broadcastGameCommand", "handActionResponse", options);
|
||||
Nc.trigger("broadcastGameCommand", "handActionResponse", options);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -85,7 +85,7 @@ function (Parent, NotificationCenter) {
|
|||
Parent.prototype.kill.call(this, killedByPlayer, ragDollId);
|
||||
|
||||
this.broadcastStats();
|
||||
NotificationCenter.trigger("broadcastGameCommand", "playerKill", {
|
||||
Nc.trigger("broadcastGameCommand", "playerKill", {
|
||||
playerId: this.id,
|
||||
killedByPlayerId: killedByPlayer.id,
|
||||
ragDollId: ragDollId
|
||||
|
|
@ -102,7 +102,7 @@ function (Parent, NotificationCenter) {
|
|||
};
|
||||
|
||||
Player.prototype.broadcastStats = function() {
|
||||
NotificationCenter.trigger("broadcastGameCommand", "updateStats", {
|
||||
Nc.trigger("broadcastGameCommand", "updateStats", {
|
||||
playerId: this.id,
|
||||
stats: this.stats
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue