cleanup debug canvas #36

This commit is contained in:
Jeena 2015-03-01 15:09:14 +01:00
parent 8dacc83f7a
commit f4c7d9edeb
4 changed files with 21 additions and 60 deletions

View file

@ -4,10 +4,11 @@ define([
"Game/Client/View/DomController",
"Lib/Vendor/Box2D",
"Lib/Utilities/NotificationCenter",
"Game/Client/View/Pixi/DebugDraw"
"Game/Client/View/Pixi/DebugDraw",
"Game/Client/View/Pixi/Layers/Debug"
],
function (Parent, Settings, DomController, Box2D, Nc, DebugDraw) {
function (Parent, Settings, DomController, Box2D, Nc, DebugDraw, DebugLayer) {
"use strict";
@ -31,12 +32,10 @@ function (Parent, Settings, DomController, Box2D, Nc, DebugDraw) {
Engine.prototype.setupDebugDraw = function () {
var debugSprite = DomController.getDebugCanvas().getContext("2d");
// set debug draw
this.debugDraw = new DebugDraw();
this.debugDraw.SetSprite(debugSprite);
this.debugDraw.SetSprite(DebugLayer.graphics);
this.debugDraw.SetDrawScale(Settings.RATIO);
this.debugDraw.SetFillAlpha(0.5);
this.debugDraw.SetLineThickness(1.0);