added gangsta level and tried to fix on new level

This commit is contained in:
Jeena 2015-04-12 18:08:11 +02:00
parent 3283f97f07
commit 0592e2524d
11 changed files with 1434 additions and 15 deletions

View file

@ -25,7 +25,7 @@ function (Abstract) {
value: {
TILE: 'tile',
ITEM: 'item',
SPAWN: 'spawn'
SPAWN: 'spawnpoints'
}
});

View file

@ -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);
};