Add: JustOnTimer app

This commit is contained in:
2019-12-03 10:09:24 +09:00
parent d45ec5f076
commit f8240b459b
11 changed files with 498 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
/////////////////////////////
// Main game
var CONTENT_ID = "Just on time";
var game = new Phaser.Game(
GAME_SCREEN_SIZE.x, GAME_SCREEN_SIZE.y,
Phaser.CANVAS, CONTENT_ID,
this, false, false
);
WebFontConfig = {
// 'active' means all requested fonts have finished loading
// We set a 1 second delay before calling 'createText'.
// For some reason if we don't the browser cannot render the text the first time it's created.
active: function() { game.time.events.add(Phaser.Timer.SECOND * 0.1, fontLoaded, this); },
// The Google Fonts we want to load (specify as many as you like in the array)
google: {
families: [
'Orbitron:800',
'Nanum Gothic:400, 700, 800',
'Nanum Gothic Coding:400, 700',
// 'Nanum Brush Script',
// 'Nanum Pen Script'
]
// families: ['Nanum Brush Script']
}
};
var justOnTime = new JustOnTime();
game.state.add('JustOnTime', justOnTime);
game.state.start('JustOnTime');
function fontLoaded() {
justOnTime.fontLoaded();
}