mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added gangsta level and tried to fix on new level
This commit is contained in:
parent
3283f97f07
commit
0592e2524d
11 changed files with 1434 additions and 15 deletions
|
|
@ -22,6 +22,8 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
|||
|
||||
Parent.call(this);
|
||||
|
||||
this.xyz = Math.random()
|
||||
|
||||
this.layerManager = null;
|
||||
this.stage = null;
|
||||
this.container = null;
|
||||
|
|
@ -52,6 +54,7 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
|||
|
||||
if(Settings.USE_WEBGL) {
|
||||
|
||||
PIXI.WebGLRenderer.glContextId = 0;
|
||||
this.renderer = new PIXI.WebGLRenderer(Settings.STAGE_WIDTH, Settings.STAGE_HEIGHT, rendererOptions);
|
||||
console.log('WebGLRenderer');
|
||||
|
||||
|
|
@ -62,6 +65,7 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
|||
|
||||
}
|
||||
|
||||
|
||||
this.stage = new PIXI.Stage(0x333333);
|
||||
|
||||
this.container = new PIXI.DisplayObjectContainer();
|
||||
|
|
@ -95,6 +99,7 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
|||
}
|
||||
|
||||
PixiView.prototype.render = function () {
|
||||
|
||||
if (this.me) {
|
||||
this.layerManager.render(this.calculateCenterPosition(), this.currentZoom);
|
||||
}
|
||||
|
|
@ -245,6 +250,9 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
|||
|
||||
this.renderer.render(this.stage);
|
||||
|
||||
this.renderer.destroy();
|
||||
delete this.renderer;
|
||||
|
||||
Parent.prototype.destroy.call(this);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue