Small new demo and refactored collision list - now far less comparisons to perform!

This commit is contained in:
Richard Davey
2013-09-13 04:22:12 +01:00
parent 0a42269479
commit 62d77e7038
8 changed files with 535 additions and 319 deletions
-17
View File
@@ -145,23 +145,6 @@ Phaser.Physics.Arcade.Body.prototype = {
},
/*
postUpdate: function () {
// 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);
this.sprite.x = (this.x - this.offset.x + (this.sprite.anchor.x * this.width)) - (this.game.world.camera.x * this.sprite.scrollFactor.x);
this.sprite.y = (this.y - this.offset.y + (this.sprite.anchor.y * this.height)) - (this.game.world.camera.y * this.sprite.scrollFactor.y);
if (this.allowRotation)
{
this.sprite.angle = this.rotation;
}
},
*/
checkWorldBounds: function () {
if (this.x < this.game.world.bounds.x)