Commit 6c7405b3 authored by 18손재민's avatar 18손재민

호패 생성시 돈 안쓰는 버그, 강호패가 단어 공간에 나타나는 버그 수정 및 획득 엽전 수치 조정

parent e1bc4116
......@@ -393,7 +393,6 @@ socket.on('attackSucceed', function(msg)
{
//console.log('client');
let tempWord = WordSpace.generateWord.Name(ScenesData.gameScene, true, RoomData.findPlayer(msg.victimId));
tempWord.instantiate(ScenesData.gameScene);
let victimPos = RoomData.findPlayer(msg.victimId).position;
tempWord.physicsObj.setPosition(victimPos.x, victimPos.y);
tempWord.wordObj.setPosition(tempWord.physicsObj.x, tempWord.physicsObj.y);
......@@ -417,10 +416,9 @@ var gameEndMenu = function(isWin)
let earnedMoney = 0;
if(isWin) earnedMoney += 20;
earnedMoney += RoomData.myself.killCount * 3;
earnedMoney += parseInt(WordSpace.playerTyping / 10);
earnedMoney += parseInt(WordSpace.playerTyping / 40);
earnedMoney += Math.max(20, Math.pow(RoomData.myself.attackSucceed, 2));
earnedMoney += parseInt(20 * (1 - (RoomData.myself.rank - 1) / (RoomData.players.length - 1)));
earnedMoney = parseInt(earnedMoney / 40);
Input.inputField.text.destroy();
......@@ -432,7 +430,6 @@ var gameEndMenu = function(isWin)
ScenesData.changeScene('menuScene');
}
ScenesData.gameScene.backToMenuDialog = ScenesData.gameScene.rexUI.add.dialog({
x: game.config.width / 2,
y: game.config.height / 2,
......
......@@ -291,7 +291,7 @@ var hopaeScene = new Phaser.Class(
if(PlayerData.userData.hopae === undefined || PlayerData.userData.hopae.length == 0 || PlayerData.userData.money > 0)
{
fbClient.updateUserData('hopae', {name: Input.inputField.text.text, type: 'wood'});
if(PlayerData.userData.hopae === undefined || PlayerData.userData.hopae.length == 0) fbClient.updateUserData('money', -1);
if(!(PlayerData.userData.hopae === undefined || PlayerData.userData.hopae.length == 0)) fbClient.updateUserData('money', -1);
ScenesData.changeScene('menuScene');
}
else
......
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