Fixed the Body collide issues and optimised the process at the same time. Now the QuadTree appears to work perfectly as a result. Bonus!

This commit is contained in:
Richard Davey
2013-09-08 01:24:59 +01:00
parent bb5d8ca170
commit fe6664eac7
7 changed files with 116 additions and 44 deletions
+5
View File
@@ -28,6 +28,7 @@ Phaser.Utils.Debug.prototype = {
renderShadow: true,
currentX: 0,
currentY: 0,
currentAlpha: 1,
context: null,
/**
@@ -55,16 +56,20 @@ Phaser.Utils.Debug.prototype = {
this.currentColor = color;
}
this.currentAlpha = this.context.globalAlpha;
this.context.save();
this.context.setTransform(1, 0, 0, 1, 0, 0);
this.context.fillStyle = color;
this.context.font = this.font;
this.context.globalAlpha = 1;
},
stop: function () {
this.context.restore();
this.context.globalAlpha = this.currentAlpha;
},