Commit baf5af72 authored by 18손재민's avatar 18손재민

시즌 16호 머지

parent a40cdddf
......@@ -82,7 +82,7 @@ class GameRoom
{
this.roomId = GameServer.getRoomNumber();
this.roomIndex = -1;
this.startCount = 2;
this.startCount = 3;
this.maxPlayer = 100;
this.nextRank = 100;
......@@ -143,7 +143,7 @@ class GameRoom
{
if (this.currentPhase === GameServer.Phase.READY)
{
this.endTime = Date.now() + 5000; // 테스트용 10초
this.endTime = Date.now() + 10000; // 테스트용 10초
this.announceToRoom('setRoomCount',
{
isEnable: true, endTime: this.endTime, playerCount: this.currentPlayer.length,
......
......@@ -249,6 +249,7 @@ socket.on('gameEnd', function(msg) // object player
console.log(msg.nickname + ' Win!!!!!!');
if(msg.id == RoomData.myself.id)
{
RoomData.myself.rank = 1;
backToMenu(true);
}
});
......@@ -315,8 +316,8 @@ var backToMenu = function(isWin)
}
}),
actions: [
UIObject.createLabel(ScenesData.gameScene, game.config.width / 2 - 120, game.config.height / 2 + 300, 10, 'button', 1, 'center', '나가기').layout(),
UIObject.createLabel(ScenesData.gameScene, game.config.width / 2 + 120, game.config.height / 2 + 300, 10, 'button', 1, 'center', '관전하기').layout()
UIObject.createLabel(ScenesData.gameScene, game.config.width / 2 - 120, game.config.height / 2 + 300, 20, 'button', 1, 'center', '나가기').layout(),
UIObject.createLabel(ScenesData.gameScene, game.config.width / 2 + 120, game.config.height / 2 + 300, 20, 'button', 1, 'center', '관전하기').layout()
],
space: {
......@@ -331,22 +332,15 @@ var backToMenu = function(isWin)
align: {
actions: 'center' // 'center'|'left'|'right'
}
}).setDepth(10);
}).setDepth(20);
ScenesData.gameScene.backToMenuDialog
.on('button.click', function (button, groupName, index) {
if(index == 0)
{
temp();
}
if(index == 0) temp();
else
{
ScenesData.gameScene.backToMenuDialog.setVisible(false);
ScenesData.gameScene.backToMenuBtn = UIObject.createButton(ScenesData.gameScene, UIObject.createLabel(ScenesData.gameScene, 100, 900, 5, 'pyeongminThrow', 0.5, 'center'), 1, 0, 2,
function()
{
temp();
});
ScenesData.gameScene.backToMenuBtn = UIObject.createButton(ScenesData.gameScene, UIObject.createLabel(ScenesData.gameScene, 100, 900, 5, 'pyeongminThrow', 0.5, 'center'), 1, 0, 2, temp);
}
}, ScenesData.gameScene)
.on('button.over', function (button, groupName, index) {
......
......@@ -36,11 +36,10 @@ var menuScene = new Phaser.Class(
{
BackGround.drawBackground(this);
Audio.loopSound(this, 'login');
console.log(PlayerData.userData.hopae);
if(PlayerData.userData.hopae === undefined || PlayerData.userData.hopae.length == 0)
{
ScenesData.changeScene('hopaeScene');
PlayerData.userData.money += 1;
ScenesData.changeScene('hopaeScene');
return;
}
PlayerData.currentHopae = (PlayerData.userData.recentHopae == null) ? PlayerData.userData.hopae[0] : PlayerData.userData.recentHopae;
......@@ -243,7 +242,6 @@ var hopaeScene = new Phaser.Class(
],
space: {
title: 25,
content: 25,
action: 100,
......@@ -309,12 +307,14 @@ var hopaeScene = new Phaser.Class(
ScenesData.hopaeScene.checkDialog.setVisible(true).popUp(200);
}
})
this.backBtn = UIObject.createButton(this, UIObject.createLabel(this, 100, 900, 5, 'pyeongminWrite', 0.5, 'center'), 1, 0, 2,
if(!(PlayerData.userData.hopae === undefined || PlayerData.userData.hopae.length == 0))
{
this.backBtn = UIObject.createButton(this, UIObject.createLabel(this, 100, 900, 5, 'pyeongminWrite', 0.5, 'center'), 1, 0, 2,
function()
{
ScenesData.changeScene('menuScene');
});
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment