Added optimised point in circle test to CircleUtils

This commit is contained in:
Richard Davey
2013-07-27 10:57:54 +01:00
parent d80467a08a
commit 3038f6fcf8
6 changed files with 45 additions and 6 deletions
+8
View File
@@ -96,6 +96,14 @@ module Phaser {
}
static renderCircle(circle: Phaser.Circle, fillStyle: string = 'rgba(0,255,0,0.3)') {
DebugUtils.context.fillStyle = fillStyle;
DebugUtils.context.arc(circle.x, circle.y, circle.radius, 0, Math.PI * 2, false);
DebugUtils.context.fill();
}
static renderPhysicsBody(body: Phaser.Physics.Body, lineWidth: number = 1, fillStyle: string = 'rgba(0,255,0,0.2)', sleepStyle: string = 'rgba(100,100,100,0.2)') {
for (var s = 0; s < body.shapesLength; s++)