fixed problems with first world update

This commit is contained in:
jeena 2013-12-25 04:35:51 +01:00
parent 283a1ef48b
commit 93e8133c89
13 changed files with 353 additions and 166 deletions

View file

@ -83,26 +83,6 @@ function (Parent, Settings, NotificationCenter, Exception) {
}
Doll.prototype.render = function() {
if(this.actionState) {
NotificationCenter.trigger("view/updateMesh",
this.animatedMeshes[this.actionState],
{
x: this.body.GetPosition().x * Settings.RATIO,
y: this.body.GetPosition().y * Settings.RATIO
}
);
NotificationCenter.trigger("view/updateMesh",
this.headMesh,
{
x: this.body.GetPosition().x * Settings.RATIO,
y: this.body.GetPosition().y * Settings.RATIO - 31
}
)
}
}
Doll.prototype.lookAt = function(x, y) {
var oldLookDirection = this.lookDirection;
@ -140,6 +120,26 @@ function (Parent, Settings, NotificationCenter, Exception) {
Parent.prototype.destroy.call(this);
}
Doll.prototype.render = function() {
if(this.actionState) {
NotificationCenter.trigger("view/updateMesh",
this.animatedMeshes[this.actionState],
{
x: this.body.GetPosition().x * Settings.RATIO,
y: this.body.GetPosition().y * Settings.RATIO
}
);
NotificationCenter.trigger("view/updateMesh",
this.headMesh,
{
x: this.body.GetPosition().x * Settings.RATIO,
y: this.body.GetPosition().y * Settings.RATIO - 31
}
)
}
}
return Doll;