some changes

This commit is contained in:
jeena 2014-01-09 23:02:57 +01:00
parent 764220675b
commit 86dcdf92df
5 changed files with 250 additions and 4 deletions

View file

@ -0,0 +1,52 @@
define([
"Game/Core/Physics/Doll",
"Game/Config/Settings",
"Game/Core/NotificationCenter"
],
function (Parent, Settings, NotificationCenter) {
function Doll(physicsEngine, playerId) {
Parent.call(this, physicsEngine, playerId);
this.height = 36;
}
Doll.prototype = Object.create(Parent.prototype);
Doll.prototype.createMesh = function() {
var self = this;
var imgPath = Settings.GRAPHICS_PATH
+ Settings.GRAPHICS_SUBPATH_CHARACTERS
+ 'Chuck' + '/'
+ 'chuck.png';
var callback = function(mesh) {
self.mesh = mesh;
NotificationCenter.trigger("view/addMesh", mesh);
}
NotificationCenter.trigger("view/createMesh",
10,
36,
0,
0,
imgPath,
callback
);
};
Doll.prototype.render = function() {
NotificationCenter.trigger("view/updateMesh",
this.mesh,
{
x: this.body.GetPosition().x * Settings.RATIO + 4,
y: (this.body.GetPosition().y * Settings.RATIO) - 29
}
);
}
return Doll;
});

View file

@ -2,11 +2,11 @@ define([
"Game/Config/Settings",
"Lib/Utilities/Exception",
"Game/Client/View/Views/AbstractView",
"Game/Client/View/Views/ThreeView",
//"Game/Client/View/Views/ThreeView",
"Game/Client/View/Views/PixiView",
],
function (Settings, Exception, AbstractView, ThreeView, PixiView) {
function (Settings, Exception, AbstractView, PixiView) {
var ViewManager = {};