mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
hides default layers while loading level
This commit is contained in:
parent
a22fbcbbc8
commit
aaa1db4468
2 changed files with 14 additions and 2 deletions
|
|
@ -35,7 +35,8 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
|||
this.init();
|
||||
|
||||
this.ncTokens = this.ncTokens.concat([
|
||||
Nc.on(Nc.ns.client.pointerLock.change, this.onPointerLockChange, this)
|
||||
Nc.on(Nc.ns.client.pointerLock.change, this.onPointerLockChange, this),
|
||||
Nc.on(Nc.ns.core.game.events.level.loaded, this.showDefaultLayers, this)
|
||||
]);
|
||||
|
||||
PIXI.scaleModes.DEFAULT = PIXI.scaleModes.NEAREST;
|
||||
|
|
@ -84,20 +85,31 @@ function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, Layer
|
|||
this.stage.addChild(this.gameStats.getInfoContainer());
|
||||
|
||||
this.ghostLayer = new Ghost();
|
||||
this.ghostLayer.hide();
|
||||
this.layerManager.insert(this.ghostLayer, false);
|
||||
|
||||
this.swiperLayer = new Swiper();
|
||||
this.swiperLayer.hide()
|
||||
this.layerManager.insert(this.swiperLayer, false);
|
||||
|
||||
this.debugLayer = Debug;
|
||||
this.debugLayer.hide();
|
||||
this.layerManager.insert(this.debugLayer, false);
|
||||
|
||||
this.messagesLayer = new Messages();
|
||||
this.messagesLayer.hide();
|
||||
this.layerManager.insert(this.messagesLayer, false);
|
||||
|
||||
this.render();
|
||||
}
|
||||
|
||||
PixiView.prototype.showDefaultLayers = function() {
|
||||
this.ghostLayer.show();
|
||||
this.swiperLayer.show()
|
||||
this.debugLayer.show();
|
||||
this.messagesLayer.show();
|
||||
};
|
||||
|
||||
PixiView.prototype.render = function () {
|
||||
|
||||
if (this.me) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue