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

시즌 16호 머지

parent a40cdddf
...@@ -82,7 +82,7 @@ class GameRoom ...@@ -82,7 +82,7 @@ class GameRoom
{ {
this.roomId = GameServer.getRoomNumber(); this.roomId = GameServer.getRoomNumber();
this.roomIndex = -1; this.roomIndex = -1;
this.startCount = 2; this.startCount = 3;
this.maxPlayer = 100; this.maxPlayer = 100;
this.nextRank = 100; this.nextRank = 100;
...@@ -143,7 +143,7 @@ class GameRoom ...@@ -143,7 +143,7 @@ class GameRoom
{ {
if (this.currentPhase === GameServer.Phase.READY) if (this.currentPhase === GameServer.Phase.READY)
{ {
this.endTime = Date.now() + 5000; // 테스트용 10초 this.endTime = Date.now() + 10000; // 테스트용 10초
this.announceToRoom('setRoomCount', this.announceToRoom('setRoomCount',
{ {
isEnable: true, endTime: this.endTime, playerCount: this.currentPlayer.length, isEnable: true, endTime: this.endTime, playerCount: this.currentPlayer.length,
......
...@@ -249,6 +249,7 @@ socket.on('gameEnd', function(msg) // object player ...@@ -249,6 +249,7 @@ socket.on('gameEnd', function(msg) // object player
console.log(msg.nickname + ' Win!!!!!!'); console.log(msg.nickname + ' Win!!!!!!');
if(msg.id == RoomData.myself.id) if(msg.id == RoomData.myself.id)
{ {
RoomData.myself.rank = 1;
backToMenu(true); backToMenu(true);
} }
}); });
...@@ -315,8 +316,8 @@ var backToMenu = function(isWin) ...@@ -315,8 +316,8 @@ var backToMenu = function(isWin)
} }
}), }),
actions: [ 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, 20, '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()
], ],
space: { space: {
...@@ -331,22 +332,15 @@ var backToMenu = function(isWin) ...@@ -331,22 +332,15 @@ var backToMenu = function(isWin)
align: { align: {
actions: 'center' // 'center'|'left'|'right' actions: 'center' // 'center'|'left'|'right'
} }
}).setDepth(10); }).setDepth(20);
ScenesData.gameScene.backToMenuDialog ScenesData.gameScene.backToMenuDialog
.on('button.click', function (button, groupName, index) { .on('button.click', function (button, groupName, index) {
if(index == 0) if(index == 0) temp();
{
temp();
}
else else
{ {
ScenesData.gameScene.backToMenuDialog.setVisible(false); 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, ScenesData.gameScene.backToMenuBtn = UIObject.createButton(ScenesData.gameScene, UIObject.createLabel(ScenesData.gameScene, 100, 900, 5, 'pyeongminThrow', 0.5, 'center'), 1, 0, 2, temp);
function()
{
temp();
});
} }
}, ScenesData.gameScene) }, ScenesData.gameScene)
.on('button.over', function (button, groupName, index) { .on('button.over', function (button, groupName, index) {
......
...@@ -36,11 +36,10 @@ var menuScene = new Phaser.Class( ...@@ -36,11 +36,10 @@ var menuScene = new Phaser.Class(
{ {
BackGround.drawBackground(this); BackGround.drawBackground(this);
Audio.loopSound(this, 'login'); Audio.loopSound(this, 'login');
console.log(PlayerData.userData.hopae);
if(PlayerData.userData.hopae === undefined || PlayerData.userData.hopae.length == 0) if(PlayerData.userData.hopae === undefined || PlayerData.userData.hopae.length == 0)
{ {
ScenesData.changeScene('hopaeScene');
PlayerData.userData.money += 1; PlayerData.userData.money += 1;
ScenesData.changeScene('hopaeScene');
return; return;
} }
PlayerData.currentHopae = (PlayerData.userData.recentHopae == null) ? PlayerData.userData.hopae[0] : PlayerData.userData.recentHopae; PlayerData.currentHopae = (PlayerData.userData.recentHopae == null) ? PlayerData.userData.hopae[0] : PlayerData.userData.recentHopae;
...@@ -243,7 +242,6 @@ var hopaeScene = new Phaser.Class( ...@@ -243,7 +242,6 @@ var hopaeScene = new Phaser.Class(
], ],
space: { space: {
title: 25,
content: 25, content: 25,
action: 100, action: 100,
...@@ -309,13 +307,15 @@ var hopaeScene = new Phaser.Class( ...@@ -309,13 +307,15 @@ var hopaeScene = new Phaser.Class(
ScenesData.hopaeScene.checkDialog.setVisible(true).popUp(200); ScenesData.hopaeScene.checkDialog.setVisible(true).popUp(200);
} }
}) })
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, this.backBtn = UIObject.createButton(this, UIObject.createLabel(this, 100, 900, 5, 'pyeongminWrite', 0.5, 'center'), 1, 0, 2,
function() function()
{ {
ScenesData.changeScene('menuScene'); ScenesData.changeScene('menuScene');
}); });
} }
}
}); });
var roomScene = new Phaser.Class( var roomScene = new Phaser.Class(
......
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