From e7914f968b84e02b8f0174cdde62bca2dd5a540e Mon Sep 17 00:00:00 2001 From: Cong Date: Sun, 5 Jul 2015 23:07:28 +1000 Subject: [PATCH] Try preloading font --- index.html | 6 +++--- scripts/index.js | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index cdcb08d..3f3b1b0 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ body{ margin: 0; padding: 0; - font-family: VT323; + font-family: VT323, monospace; } @@ -29,9 +29,9 @@ - - + +
Drunken Viking
\ No newline at end of file diff --git a/scripts/index.js b/scripts/index.js index c266b4a..4f4dc88 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -1,4 +1,5 @@ -window.onload = function() { +window.onload = function() { setTimeout(function () { + document.getElementById('fontLoader').style.display = 'none'; var game = new Phaser.Game(SCREEN_WIDTH, SCREEN_HEIGHT, Phaser.AUTO, 'gameContainer', null, false, false); @@ -6,4 +7,4 @@ window.onload = function() { game.state.add('preload', BasicGame.Preload); game.state.add('game', GameState); game.state.start('boot'); -}; \ No newline at end of file +}, 1000); }; \ No newline at end of file