Files
chocomae/src/game/license_timer/loading.js
T
2018-12-07 23:08:32 +09:00

86 lines
2.8 KiB
JavaScript

var Loading = {
preload: function() {
// game.load.image('loadingbar', './image/phaser.png');
},
create: function() {
// var userID = sessionStorage.getItem("UserID");
// console.log("userID : " + userID);
// game.stage.backgroundColor = '#4d4d4d';
// // Progress report
// this.textProgress = game.add.text(game.world.centerX, 100, '로딩중 . . .', textStyleBasic);
// this.textProgress.anchor.setTo(0.5, 0.4);
// this.textProgress.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
// // Preload bar
// this.preloadBar = this.add.sprite(game.world.centerX, game.world.centerY, 'loadingbar');
// this.preloadBar.anchor.setTo(0.5);
// this.preloadBar.alpha = 0;
game.load.onFileComplete.add(this.fileComplete, this);
game.load.onLoadComplete.add(this.loadComplete, this);
this.startLoading();
},
startLoading: function() {
game.load.image('icon_fullscreen', '../../../resources/image/icon/fullscreen_white.png');
// game.load.image('a', '../../../resources/image/icon/fullscreen_white.png');
// game.load.image('b', '../../../resources/image/icon/fullscreen_white.png');
// game.load.image('c', '../../../resources/image/icon/fullscreen_white.png');
// game.load.image('d', '../../../resources/image/icon/fullscreen_white.png');
// game.load.image('a', './image/phaser.png');
// game.load.image('b', './image/phaser.png');
// game.load.image('c', './image/phaser.png');
// game.load.image('d', './image/phaser.png');
// game.load.image('e', './image/phaser.png');
// game.load.image('g', './image/phaser.png');
// game.load.image('e', './image/phaser.png');
// game.load.image('f', './image/phaser.png');
// game.load.image('g', './image/phaser.png');
// game.load.image('h', './image/phaser.png');
// game.load.image('phaser', './image/phaser.png');
// game.load.spritesheet('button', './image/button_basic.png', 200, 100);
// game.load.image('star', './image/star_particle.png');
// game.load.image('medal_gold', './image/medal_gold.png');
// game.load.image('medal_silver', './image/medal_silver.png');
// game.load.image('medal_bronze', './image/medal_bronze.png');
game.load.start();
},
fileComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
// this.preloadBar.alpha = progress / 100;
// console.log('progress : ' + progress);
// text.setText("File Complete: " + progress + "% - " + totalLoaded + " out of " + totalFiles);
// var newImage = game.add.image(x, y, cacheKey);
// newImage.scale.set(0.3);
// x += newImage.width + 20;
// if (x > 700)
// {
// x = 32;
// y += 332;
// }
},
loadComplete: function(progress, cacheKey, success, totalLoaded, totalFiles) {
// this.preloadBar.alpha = 1;
// if(isDebugMode()) {
// this.state.start('Login');
// return;
// }
this.state.start('Login');
},
}