Add: grilled meat basic sources
This commit is contained in:
@@ -0,0 +1,145 @@
|
||||
var Game = {
|
||||
|
||||
create: function() {
|
||||
this.game.stage.backgroundColor = "#000000"; // '#4d4d4d';
|
||||
|
||||
sessionStorageManager.setIsNewAppHighestRecord(false);
|
||||
|
||||
var experienceAppTimer = new ExperienceAppTimer();
|
||||
experienceAppTimer.setTimeOverListener(
|
||||
(function() { this.gameOver(); }).bind(this)
|
||||
);
|
||||
|
||||
// keyboard shortcut
|
||||
this.keyboardShortcut = new KeyboardShortcut();
|
||||
this.keyboardShortcut.addCallback(
|
||||
Phaser.KeyCode.ESC, // keyCode
|
||||
null, // keyDownHandler
|
||||
(function() { this.back(); }).bind(this), // keyUpHandler
|
||||
"card matching" // callerClassName
|
||||
);
|
||||
|
||||
// top ui
|
||||
var screenTopUI = new ScreenTopUI();
|
||||
screenTopUI.makeBackButton( (function() { this.back(); }).bind(this) );
|
||||
screenTopUI.makeFullScreenButton();
|
||||
|
||||
this.scoreManager = new ScoreManager();
|
||||
this.scoreBoard = new ScoreBoard();
|
||||
this.scoreManager.addOnChangeScoreListener(
|
||||
(function(score) {
|
||||
sessionStorageManager.setRecord(score);
|
||||
this.scoreBoard.printScore(NumberUtil.numberWithCommas(score));
|
||||
}).bind(this)
|
||||
);
|
||||
this.scoreManager.addOnChangeHighScoreListener(
|
||||
(function(highScore) {
|
||||
// console.log(highScore);
|
||||
// sessionStorageManager.setAppHighestRecord(highScore);
|
||||
sessionStorageManager.setIsNewBestRecrd(true);
|
||||
// this.screenBottomUI.printLeftTextWithAppHighestRecord(sessionStorageManager.getAppHighestRecord());
|
||||
}).bind(this)
|
||||
);
|
||||
|
||||
this.setClickEnable(false);
|
||||
this.stageTimer = new StageTimer(
|
||||
Game.GAME_TIME_SEC,
|
||||
(function() {
|
||||
this.setClickEnable(false);
|
||||
|
||||
this.gameOver();
|
||||
}).bind(this)
|
||||
);
|
||||
|
||||
this.initVariables();
|
||||
|
||||
|
||||
// game stage
|
||||
game.stage.backgroundColor = '#4d4d4d';
|
||||
graphics = game.add.graphics(0, 0);
|
||||
|
||||
this.plusScoreGroup = game.add.group();
|
||||
|
||||
var table = game.add.tileSprite(0, 340, GAME_SCREEN_SIZE.x, 660, 'wooden_table');
|
||||
|
||||
|
||||
// bottom ui
|
||||
var screenBottomUI = new ScreenBottomUI();
|
||||
screenBottomUI.printLeftTextWithAppHighestRecord(sessionStorageManager.getAppHighestRecord());
|
||||
screenBottomUI.printCenterText(sessionStorageManager.getPlayingAppKoreanName());
|
||||
screenBottomUI.printRightText(sessionStorageManager.getPlayerName());
|
||||
|
||||
|
||||
this.startGame();
|
||||
// // this.countDown();
|
||||
},
|
||||
|
||||
initVariables: function() {
|
||||
},
|
||||
|
||||
|
||||
|
||||
back: function() {
|
||||
sessionStorageManager.resetPlayingAppData();
|
||||
location.href = '../../web/client/menu_app.html';
|
||||
},
|
||||
|
||||
/*
|
||||
countDown: function() {
|
||||
const style = { font: "bold 200px Arial", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle" };
|
||||
this.countDownText = game.add.text(0, 0, "", style);
|
||||
this.countDownText.setTextBounds(0, 0, game.world.width, game.world.height);
|
||||
this.countDownText.stroke = "#333";
|
||||
this.countDownText.strokeThickness = 50;
|
||||
|
||||
this.countDownNumber = 3;
|
||||
if(isDebugMode())
|
||||
this.countDownNumber = 1;
|
||||
this.tweenCountDown();
|
||||
},
|
||||
|
||||
tweenCountDown: function() {
|
||||
if(this.countDownNumber === 0) {
|
||||
this.startGame();
|
||||
return;
|
||||
}
|
||||
|
||||
this.countDownText.text = this.countDownNumber.toString();
|
||||
this.countDownText.alpha = 1;
|
||||
|
||||
var countDownTween = game.add.tween(this.countDownText);
|
||||
countDownTween.to( { alpha: 0 }, 1000, Phaser.Easing.Linear.None, true);
|
||||
countDownTween.onComplete.add(this.tweenCountDown, this);
|
||||
|
||||
this.countDownNumber--;
|
||||
},
|
||||
*/
|
||||
|
||||
startGame: function() {
|
||||
},
|
||||
|
||||
startStage: function() {
|
||||
},
|
||||
|
||||
startNextStage: function() {
|
||||
},
|
||||
|
||||
|
||||
setClickEnable: function(value) {
|
||||
this.isEnableClick = value;
|
||||
},
|
||||
|
||||
|
||||
|
||||
gameOver: function() {
|
||||
},
|
||||
|
||||
goResult: function() {
|
||||
location.href = '../../web/client/result.html';
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
Game.GAME_TIME_SEC = 60;
|
||||
Game.NEXT_STAGE_DELAY_MS = 500;
|
||||
Reference in New Issue
Block a user