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

호패 버그 수정

parent 855b5158
......@@ -410,7 +410,7 @@ var gameEndMenu = function(isWin)
x: game.config.width / 2,
y: game.config.height / 2,
background: ScenesData.gameScene.add.sprite(game.config.width / 2, game.config.height / 2, 'panel').setOrigin(0.5, 0.5),
background: ScenesData.gameScene.add.sprite(game.config.width / 2, game.config.height / 2, 'noticeBackground').setOrigin(0.5, 0.5),
content: ScenesData.gameScene.rexUI.add.dialog({
x: game.config.width / 2,
......
......@@ -29,20 +29,6 @@ Input.gameSceneEnterReaction = function()
Input.isEntered = true;
}
}
Input.menuSceneEnterReaction = function()
{
Input.finalInput = Input.removeConVow(Input.finalInput);
if (Input.finalInput.length > 1)
{
PlayerData.nickname = Input.finalInput;
Input.reset();
}
else
{
alert('정확한 가명을 입력해주세요.');
Input.reset();
}
}
Input.reset = function()
{
......@@ -325,9 +311,8 @@ Input.inputField =
scene.input.keyboard.on('keyup', function() {Input.pressCount--; Input.justPressed = '';
if(isHopaeScene)
{
ScenesData.hopaeScene.checkBtn.setEnable(Input.checkProperInput(Input.inputField.text.text) ? true : false);
if(Input.finalInput.length > 4) ScenesData.hopaeScene.warningText.setVisible(true);
else ScenesData.hopaeScene.warningText.setVisible(false);
ScenesData.hopaeScene.checkBtn.setEnable(Input.checkProperInput(Input.inputField.text.text) || (Input.finalInput.length > 1) ? true : false);
ScenesData.hopaeScene.warningText.setVisible(Input.finalInput.length > 4 ? true : false);
}})
scene.input.keyboard.on('keydown-SHIFT', function() {Input.isShifted = true});
scene.input.keyboard.on('keyup-SHIFT', function() {Input.isShifted = false});
......
......@@ -43,8 +43,9 @@ ResourceLoader.loadImage = function(scene)
scene.load.spritesheet('wordBreak', 'assets/image/word/wordbreak.png', { frameWidth: 180, frameHeight: 180 });
scene.load.image('attackPaper', 'assets/image/etc/paper_crumbled.png');
scene.load.image('panel', 'assets/placeholder/panel.png');
scene.load.image('button', 'assets/placeholder/button.png');
scene.load.image('panel', 'assets/placeholder/panel.png');
scene.load.image('noticeBackground', 'assets/image/UI/noticeWindow/background.png');
scene.load.image('itemBag', 'assets/image/etc/itembag2.png');
scene.load.image('friendlyPlayBtn', 'assets/image/UI/main/friendlyPlay.png');
scene.load.image('rankPlayBtn', 'assets/image/UI/main/rankPlay.png');
......@@ -52,6 +53,11 @@ ResourceLoader.loadImage = function(scene)
scene.load.image('hopaeManageBtn', 'assets/image/UI/main/hopaeManage.png');
scene.load.image('helpBtn', 'assets/image/UI/main/help.png');
scene.load.image('helpBtn', 'assets/image/UI/decisionBtn/spectate.png');
scene.load.image('helpBtn', 'assets/image/UI/decisionBtn/help.png');
scene.load.image('helpBtn', 'assets/image/UI/decisionBtn/help.png');
scene.load.image('helpBtn', 'assets/image/UI/decisionBtn/help.png');
scene.load.spritesheet('phase1', 'assets/image/etc/scroll/startPhase/startPhase.png', { frameWidth: 280, frameHeight: 920 });
......
......@@ -140,7 +140,7 @@ var menuScene = new Phaser.Class(
x: game.config.width / 2,
y: game.config.height / 2,
background: this.add.sprite(game.config.width / 2, game.config.height / 2, 'panel').setOrigin(0.5, 0.5),
background: this.add.sprite(game.config.width / 2, game.config.height / 2, 'noticeBackground').setOrigin(0.5, 0.5),
content: this.add.text(0, 0, '대기실에 참가하시겠습니까?', {
font: '50pt sejongFont'
......@@ -253,14 +253,14 @@ var hopaeScene = new Phaser.Class(
Input.inputField.generate(this, function(){},
UIObject.createLabel(this, game.config.width / 2, game.config.height / 2, 10, 'nameBgr6', 2, 'center', '', 50, '#ffffff').getElement('text').setOrigin(0.45,0.5), true);
UIObject.createLabel(this, game.config.width / 2, game.config.height / 2 - 200, 2, 'panel', 1, 'center',
UIObject.createLabel(this, game.config.width / 2, game.config.height / 2 - 200, 2, 'noticeBackground', 1, 'center',
'호패는 오직 한글만 입력이 가능합니다.\n띄어쓰기도 사용할 수 없습니다.', 50, '#000000').layout();
this.checkDialog = this.rexUI.add.dialog({
x: game.config.width / 2,
y: game.config.height / 2,
background: this.add.sprite(game.config.width / 2, game.config.height / 2, 'panel').setOrigin(0.5, 0.5),
background: this.add.sprite(game.config.width / 2, game.config.height / 2, 'noticeBackground').setOrigin(0.5, 0.5),
content: this.add.text(0, 0, '이 이름으로 하시겠습니까?' + (PlayerData.userData.hopae === undefined || PlayerData.userData.hopae.length == 0 ?
'\n(최초 호패는 비용이 들지 않습니다.)' : '\n변경에는 엽전이 소모됩니다.'), {
......@@ -294,7 +294,7 @@ var hopaeScene = new Phaser.Class(
else
{
this.checkDialog.setVisible(false);
this.errorMsg = UIObject.createButton(this, UIObject.createLabel(this, game.config.width / 2, game.config.height / 2, 10, 'panel', 1, 'center',
this.errorMsg = UIObject.createButton(this, UIObject.createLabel(this, game.config.width / 2, game.config.height / 2, 10, 'noticeBackground', 1, 'center',
'엽전이 부족합니다', 50, '#000000').layout().popUp(200), 0, 0, 0,
function()
{
......@@ -315,7 +315,7 @@ var hopaeScene = new Phaser.Class(
.on('button.out', function (button, groupName, index) {
//console.log('button out');
});
this.warningText = UIObject.createLabel(this, game.config.width / 2, game.config.height / 2 - 100, 5, 'panel', 1, 'center',
this.warningText = UIObject.createLabel(this, game.config.width / 2, game.config.height / 2 - 100, 5, 'noticeBackground', 1, 'center',
'이름 타수가 많아 플레이에 패널티가 있을 수 있습니다', 40, '#000000').setVisible(false).layout();
this.checkBtn = UIObject.createButton(this, UIObject.createLabel(this, game.config.width / 2, 900, 5, 'pyeongminWrite', 0.5, 'center'), 1, 0, 2,
......
......@@ -54,7 +54,7 @@ UIObject.createButton = function(scene, buttonGameObject, overFrame, outFrame, d
});
let buttonGameObjectBackground = buttonGameObject.getElement('background');
temp.enabled = true;
buttonGameObjectBackground.setFrame(outFrame).setInteractive()
buttonGameObjectBackground.setFrame(outFrame > 0 ? outFrame : 0).setInteractive()
.on('pointerover', () => {
if(temp.enabled)
{
......
......@@ -473,12 +473,8 @@ WordSpace.nameQueue =
getCount: function(player)
{
WordSpace.nameQueue.counter = 0;
WordSpace.nameGroup.forEach(function(element){
if(element.id == player.id) WordSpace.nameQueue.counter++;
})
WordSpace.wordGroup.forEach(function(element){
if(element instanceof NameWord && element.ownerId == player.id) WordSpace.nameQueue.counter++;
})
WordSpace.nameGroup.forEach(function(element){ if(element.ownerId == player.id) WordSpace.nameQueue.counter++; });
WordSpace.wordGroup.forEach(function(element){ if(element instanceof NameWord && element.ownerId == player.id) WordSpace.nameQueue.counter++; });
return WordSpace.nameQueue.counter;
},
counter: 0,
......
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