From cacd5d74c0b8802933a029812d6326115787291b Mon Sep 17 00:00:00 2001 From: logsol Date: Mon, 17 Mar 2014 22:07:57 +0100 Subject: [PATCH] finished nc merge --- app/Game/Client/Control/PlayerController.js | 4 ++-- app/Game/Client/GameController.js | 2 +- app/Game/Client/GameObjects/Doll.js | 4 ++-- app/Game/Client/GameObjects/Item.js | 2 +- app/Game/Client/GameObjects/Items/RagDoll.js | 2 +- app/Game/Client/GameObjects/Tile.js | 2 +- app/Game/Client/View/Views/AbstractView.js | 6 ++---- app/Lib/Utilities/NotificationCenter.js | 3 +++ 8 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/Game/Client/Control/PlayerController.js b/app/Game/Client/Control/PlayerController.js index b1ec7de..51a149f 100755 --- a/app/Game/Client/Control/PlayerController.js +++ b/app/Game/Client/Control/PlayerController.js @@ -111,11 +111,11 @@ function (Parent, KeyboardInput, MouseInput, Nc) { }; PlayerController.prototype.showInfo = function() { - Nc.trigger(Nc.ns.client.view.gameInfo.toggle, true); + Nc.trigger(Nc.ns.client.game.gameInfo.toggle, true); }; PlayerController.prototype.hideInfo = function() { - Nc.trigger(Nc.ns.client.view.gameInfo.toggle, false); + Nc.trigger(Nc.ns.client.game.gameInfo.toggle, false); }; diff --git a/app/Game/Client/GameController.js b/app/Game/Client/GameController.js index a830b6d..23a5423 100755 --- a/app/Game/Client/GameController.js +++ b/app/Game/Client/GameController.js @@ -18,7 +18,7 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Nc, reque this.view = ViewManager.createView(); this.me = null; - Nc.on(Nc.ns.client.view.gameInfo.toggle, this.toggleInfo, this); + Nc.on(Nc.ns.client.game.gameInfo.toggle, this.toggleInfo, this); Parent.call(this); } diff --git a/app/Game/Client/GameObjects/Doll.js b/app/Game/Client/GameObjects/Doll.js index baf0e60..7671555 100755 --- a/app/Game/Client/GameObjects/Doll.js +++ b/app/Game/Client/GameObjects/Doll.js @@ -77,7 +77,7 @@ function (Parent, Settings, Nc, Exception) { Nc.trigger(Nc.ns.client.view.mesh.add, mesh); }; - Nc.trigger("view/createAnimatedMesh", texturePaths, callback, { + Nc.trigger(Nc.ns.client.view.animatedMesh.create, texturePaths, callback, { visible: false, pivot: { x: 35/2 * 4, @@ -95,7 +95,7 @@ function (Parent, Settings, Nc, Exception) { self.headMesh = mesh; Nc.trigger(Nc.ns.client.view.mesh.add, mesh); } - Nc.trigger("view/createMesh", texturePath, callback, { + Nc.trigger(Nc.ns.client.view.mesh.create, texturePath, callback, { pivot: { x: 5, y: 12 diff --git a/app/Game/Client/GameObjects/Item.js b/app/Game/Client/GameObjects/Item.js index 81abaf8..71bc2e7 100755 --- a/app/Game/Client/GameObjects/Item.js +++ b/app/Game/Client/GameObjects/Item.js @@ -25,7 +25,7 @@ function (Parent, Settings, Nc) { Nc.trigger(Nc.ns.client.view.mesh.add, mesh); } - Nc.trigger("view/createMesh", + Nc.trigger(Nc.ns.client.view.mesh.create, texturePath, callback, { diff --git a/app/Game/Client/GameObjects/Items/RagDoll.js b/app/Game/Client/GameObjects/Items/RagDoll.js index c31b004..9bf5c46 100644 --- a/app/Game/Client/GameObjects/Items/RagDoll.js +++ b/app/Game/Client/GameObjects/Items/RagDoll.js @@ -40,7 +40,7 @@ function (Parent, CoreItem, Settings, Nc) { Nc.trigger(Nc.ns.client.view.mesh.add, mesh); } - Nc.trigger("view/createMesh", + Nc.trigger(Nc.ns.client.view.mesh.create, texturePath + name + ".png", callback, { diff --git a/app/Game/Client/GameObjects/Tile.js b/app/Game/Client/GameObjects/Tile.js index c599576..4319c4d 100755 --- a/app/Game/Client/GameObjects/Tile.js +++ b/app/Game/Client/GameObjects/Tile.js @@ -30,7 +30,7 @@ function (Parent, Settings, Nc) { Nc.trigger(Nc.ns.client.view.mesh.add, mesh); } - Nc.trigger("view/createMesh", + Nc.trigger(Nc.ns.client.view.mesh.create, texturePath, callback, { diff --git a/app/Game/Client/View/Views/AbstractView.js b/app/Game/Client/View/Views/AbstractView.js index 957e918..a8327d1 100755 --- a/app/Game/Client/View/Views/AbstractView.js +++ b/app/Game/Client/View/Views/AbstractView.js @@ -12,8 +12,8 @@ function (DomController, Settings, Exception, Nc) { this.canvas = null; this.debugMode = false; - Nc.on("view/createMesh", this.createMesh, this); - Nc.on("view/createAnimatedMesh", this.createAnimatedMesh, this); + Nc.on(Nc.ns.client.view.mesh.create, this.createMesh, this); + Nc.on(Nc.ns.client.view.animatedMesh.create, this.createAnimatedMesh, this); Nc.on(Nc.ns.client.view.mesh.add, this.addMesh, this); Nc.on(Nc.ns.client.view.mesh.remove, this.removeMesh, this); Nc.on(Nc.ns.client.view.mesh.update, this.updateMesh, this); @@ -21,8 +21,6 @@ function (DomController, Settings, Exception, Nc) { Nc.on(Nc.ns.client.view.fullscreen.change, this.onFullscreenChange, this); Nc.on(Nc.ns.client.view.debugMode.toggle, this.onToggleDebugMode, this); - Nc.on("view/toggleInfo", this.onToggleInfo, this); - Nc.on(Nc.ns.client.view.playerInfo.createAndAdd, this.onCreateAndAddPlayerInfo, this); Nc.on(Nc.ns.client.view.playerInfo.update, this.onUpdatePlayerInfo, this); Nc.on(Nc.ns.client.view.playerInfo.remove, this.onRemovePlayerInfo, this); diff --git a/app/Lib/Utilities/NotificationCenter.js b/app/Lib/Utilities/NotificationCenter.js index 307eb66..3376b73 100755 --- a/app/Lib/Utilities/NotificationCenter.js +++ b/app/Lib/Utilities/NotificationCenter.js @@ -31,6 +31,9 @@ function (Exception) { remove: null, update: null }, + animatedMesh: { + create: null + }, playerInfo: { createAndAdd: null, remove: null,