mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added new debug draw
This commit is contained in:
parent
13af9ecb9c
commit
20a974124e
7 changed files with 188 additions and 7 deletions
33
app/Game/Client/View/Pixi/Layers/Debug.js
Normal file
33
app/Game/Client/View/Pixi/Layers/Debug.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
define([
|
||||
"Game/Client/View/Pixi/Layer",
|
||||
"Lib/Vendor/Pixi",
|
||||
"Game/Config/Settings",
|
||||
|
||||
],
|
||||
|
||||
function (Parent, PIXI, Settings) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Debug() {
|
||||
Parent.call(this, "Debug", 0);
|
||||
|
||||
|
||||
this.graphics = new PIXI.Graphics();
|
||||
this.container.addChild(this.graphics);
|
||||
}
|
||||
|
||||
Debug.prototype = Object.create(Parent.prototype);
|
||||
|
||||
Debug.prototype.render = function(centerPosition, zoom) {
|
||||
|
||||
Parent.prototype.render.call(this, centerPosition, zoom);
|
||||
|
||||
|
||||
|
||||
this.container.x -= 300 * zoom;
|
||||
this.container.y -= 200 * zoom;
|
||||
}
|
||||
|
||||
return new Debug();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue