mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +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.init();
|
||||||
|
|
||||||
this.ncTokens = this.ncTokens.concat([
|
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;
|
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.stage.addChild(this.gameStats.getInfoContainer());
|
||||||
|
|
||||||
this.ghostLayer = new Ghost();
|
this.ghostLayer = new Ghost();
|
||||||
|
this.ghostLayer.hide();
|
||||||
this.layerManager.insert(this.ghostLayer, false);
|
this.layerManager.insert(this.ghostLayer, false);
|
||||||
|
|
||||||
this.swiperLayer = new Swiper();
|
this.swiperLayer = new Swiper();
|
||||||
|
this.swiperLayer.hide()
|
||||||
this.layerManager.insert(this.swiperLayer, false);
|
this.layerManager.insert(this.swiperLayer, false);
|
||||||
|
|
||||||
this.debugLayer = Debug;
|
this.debugLayer = Debug;
|
||||||
|
this.debugLayer.hide();
|
||||||
this.layerManager.insert(this.debugLayer, false);
|
this.layerManager.insert(this.debugLayer, false);
|
||||||
|
|
||||||
this.messagesLayer = new Messages();
|
this.messagesLayer = new Messages();
|
||||||
|
this.messagesLayer.hide();
|
||||||
this.layerManager.insert(this.messagesLayer, false);
|
this.layerManager.insert(this.messagesLayer, false);
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PixiView.prototype.showDefaultLayers = function() {
|
||||||
|
this.ghostLayer.show();
|
||||||
|
this.swiperLayer.show()
|
||||||
|
this.debugLayer.show();
|
||||||
|
this.messagesLayer.show();
|
||||||
|
};
|
||||||
|
|
||||||
PixiView.prototype.render = function () {
|
PixiView.prototype.render = function () {
|
||||||
|
|
||||||
if (this.me) {
|
if (this.me) {
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ function () {
|
||||||
|
|
||||||
// NETWORKING
|
// NETWORKING
|
||||||
NETWORK_UPDATE_INTERVAL: 70, // in milliseconds
|
NETWORK_UPDATE_INTERVAL: 70, // in milliseconds
|
||||||
NETWORK_LOG_INCOMING: true,
|
NETWORK_LOG_INCOMING: false,
|
||||||
NETWORK_LOG_OUTGOING: false,
|
NETWORK_LOG_OUTGOING: false,
|
||||||
NETWORK_LOG_FILTER: ["ping", "pong", "worldUpdate", "lookAt"],
|
NETWORK_LOG_FILTER: ["ping", "pong", "worldUpdate", "lookAt"],
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue