Group nearly done. Sprite.anchor appears to be broken though, must fix.

This commit is contained in:
Richard Davey
2013-09-06 20:20:58 +01:00
parent 822a2df289
commit eb7af3d2a2
11 changed files with 544 additions and 199 deletions
-84
View File
@@ -160,36 +160,6 @@ Phaser.Physics.Arcade.Body.prototype = {
},
postUpdate: function () {
/*
// The State update may (almost certainly?) will had
if (this.collideWorldBounds)
{
// Adjust sprite directly?
this.checkWorldBounds();
}
console.log('pre pu', this.x, this.y);
// if (this.moves)
// {
this.sprite.x = this.x - this.offset.x + (this.sprite.anchor.x * this.width);
this.sprite.y = this.y - this.offset.y + (this.sprite.anchor.y * this.height);
// }
console.log('post pu', this.sprite.x, this.sprite.y);
if (this.allowRotation)
{
this.sprite.angle = this.rotation;
}
*/
},
setSize: function (width, height, offsetX, offsetY) {
offsetX = offsetX || this.offset.x;
@@ -207,60 +177,6 @@ Phaser.Physics.Arcade.Body.prototype = {
},
/*
hullWidth: function () {
if (this.deltaX() > 0)
{
return this.width + this.deltaX();
}
else
{
return this.width - this.deltaX();
}
},
hullHeight: function () {
if (this.deltaY() > 0)
{
return this.height + this.deltaY();
}
else
{
return this.height - this.deltaY();
}
},
hullX: function () {
if (this.x < this.lastX)
{
return this.x;
}
else
{
return this.lastX;
}
},
hullY: function () {
if (this.y < this.lastY)
{
return this.y;
}
else
{
return this.lastY;
}
},
*/
deltaAbsX: function () {
return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX());
},