mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
This commit is contained in:
parent
502cf72a7e
commit
c87997c774
13 changed files with 134 additions and 27 deletions
|
|
@ -9,7 +9,7 @@ function (PIXI, Nc, Settings, ColorConverter) {
|
|||
|
||||
"use strict";
|
||||
|
||||
function GameStats(gameContainer) {
|
||||
function GameStats(view) {
|
||||
|
||||
this.style = {
|
||||
borderWidth: 3,
|
||||
|
|
@ -27,7 +27,7 @@ function (PIXI, Nc, Settings, ColorConverter) {
|
|||
fontSize: 12
|
||||
};
|
||||
|
||||
this.gameContainer = gameContainer;
|
||||
this.view = view;
|
||||
|
||||
this.container = new PIXI.DisplayObjectContainer();
|
||||
|
||||
|
|
@ -77,11 +77,12 @@ function (PIXI, Nc, Settings, ColorConverter) {
|
|||
this.redraw();
|
||||
// show stats with filters
|
||||
this.container.visible = true;
|
||||
this.gameContainer.filters = this.filters;
|
||||
|
||||
this.view.addFilters(this.filters);
|
||||
this.filters.forEach(function(filter) { filter.dirty = true; });
|
||||
} else {
|
||||
this.container.visible = false;
|
||||
this.gameContainer.filters = null;
|
||||
this.view.removeFilters(this.filters);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue