mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixed problems with first world update
This commit is contained in:
parent
283a1ef48b
commit
93e8133c89
13 changed files with 353 additions and 166 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue