N4TE227UKRZXHF4AIDMN6WAD5HUIRCLGLG7XQV5H452JVHBEJ4TAC this.scoreText = new Pixi.Text('', {fontFamily: 'PixelMix',padding: 4, // https://github.com/pixijs/pixi.js/issues/4500 -- otherwise on first load the text bounding box is calculated to be too small and the tops of the f's get cut offfontSize: 26, // use 26 then scale down 50% results in sharper letters than 13// align: 'center'});// this.scoreText.scale = PixiPointFrom(new Vector2(0.5, 0.5));this.scoreText.pivot.x = 0.5;this.scoreText.y = 8;this.container.addChild(this.scoreText);
this.scoreText.x = props.appSize.x * 0.05;this.scoreText.text = 'Score: ' + props.gameState.playerSave.score.toString();if (props.tick < 60 && props.tick % 10 === 5) { // poll for document webfonts loaded; TODO, substitute for listening to actual fonts ready eventthis.scoreText.updateText(false); // false == force reload text even when text has not changed. needed to get new fonts}