mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
Makes singleton variable name of NotificationCenter lowercase
When we require a singleton, its instance name should be named by lowercase, since it is not a class. Relates to #128
This commit is contained in:
parent
ffc55a204a
commit
3cb2e39a18
57 changed files with 262 additions and 262 deletions
|
|
@ -4,7 +4,7 @@ define([
|
|||
"Game/Channel/Control/PlayerController"
|
||||
],
|
||||
|
||||
function (Parent, Nc, PlayerController) {
|
||||
function (Parent, nc, PlayerController) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ function (Parent, Nc, PlayerController) {
|
|||
this.throw(options, item);
|
||||
|
||||
options.action = "throw";
|
||||
Nc.trigger(Nc.ns.channel.to.client.gameCommand.broadcast, "handActionResponse", options);
|
||||
nc.trigger(nc.ns.channel.to.client.gameCommand.broadcast, "handActionResponse", options);
|
||||
}
|
||||
} else {
|
||||
// grab
|
||||
|
|
@ -52,7 +52,7 @@ function (Parent, Nc, PlayerController) {
|
|||
this.grab(item);
|
||||
|
||||
options.action = "grab";
|
||||
Nc.trigger(Nc.ns.channel.to.client.gameCommand.broadcast, "handActionResponse", options);
|
||||
nc.trigger(nc.ns.channel.to.client.gameCommand.broadcast, "handActionResponse", options);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -93,14 +93,14 @@ function (Parent, Nc, PlayerController) {
|
|||
var ragDollId = this.stats.deaths;
|
||||
Parent.prototype.kill.call(this, killedByPlayer, ragDollId);
|
||||
|
||||
Nc.trigger(Nc.ns.channel.to.client.gameCommand.broadcast, "playerKill", {
|
||||
nc.trigger(nc.ns.channel.to.client.gameCommand.broadcast, "playerKill", {
|
||||
playerId: this.id,
|
||||
killedByPlayerId: killedByPlayer.id,
|
||||
ragDollId: ragDollId,
|
||||
item: byItem ? byItem.options.name : "Suicide"
|
||||
});
|
||||
|
||||
Nc.trigger(Nc.ns.channel.events.game.player.killed, this, killedByPlayer); // sends endround
|
||||
nc.trigger(nc.ns.channel.events.game.player.killed, this, killedByPlayer); // sends endround
|
||||
|
||||
if(this.ragDoll) {
|
||||
this.ragDoll.delayedDestroy();
|
||||
|
|
@ -112,13 +112,13 @@ function (Parent, Nc, PlayerController) {
|
|||
};
|
||||
|
||||
Player.prototype.broadcastStats = function(enemy) {
|
||||
Nc.trigger(Nc.ns.channel.to.client.gameCommand.broadcast, "updateStats", {
|
||||
nc.trigger(nc.ns.channel.to.client.gameCommand.broadcast, "updateStats", {
|
||||
playerId: this.id,
|
||||
stats: this.stats
|
||||
});
|
||||
|
||||
if(enemy && enemy != this) {
|
||||
Nc.trigger(Nc.ns.channel.to.client.gameCommand.broadcast, "updateStats", {
|
||||
nc.trigger(nc.ns.channel.to.client.gameCommand.broadcast, "updateStats", {
|
||||
playerId: enemy.id,
|
||||
stats: enemy.stats
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue