replaced NotificationCenter with Nc

This commit is contained in:
logsol 2014-03-01 11:07:23 +01:00
parent da913c4709
commit 672a46efa8
35 changed files with 160 additions and 161 deletions

View file

@ -4,7 +4,7 @@ define([
"Lib/Utilities/NotificationCenter"
],
function (Parent, Settings, NotificationCenter) {
function (Parent, Settings, Nc) {
function Item(physicsEngine, uid, options) {
Parent.call(this, physicsEngine, uid, options);
@ -22,10 +22,10 @@ function (Parent, Settings, NotificationCenter) {
var callback = function(mesh) {
self.mesh = mesh;
NotificationCenter.trigger("view/addMesh", mesh);
Nc.trigger("view/addMesh", mesh);
}
NotificationCenter.trigger("view/createMesh",
Nc.trigger("view/createMesh",
texturePath,
callback,
{
@ -40,13 +40,13 @@ function (Parent, Settings, NotificationCenter) {
};
Item.prototype.destroy = function() {
NotificationCenter.trigger("view/removeMesh", this.mesh);
Nc.trigger("view/removeMesh", this.mesh);
Parent.prototype.destroy.call(this);
};
Item.prototype.render = function() {
NotificationCenter.trigger("view/updateMesh",
Nc.trigger("view/updateMesh",
this.mesh,
{
x: this.body.GetPosition().x * Settings.RATIO,
@ -62,7 +62,7 @@ function (Parent, Settings, NotificationCenter) {
Parent.prototype.flip.call(this, direction);
if(oldFlipDirection != direction) {
NotificationCenter.trigger("view/updateMesh",
Nc.trigger("view/updateMesh",
this.mesh,
{
xScale: direction