Commit 116d0330 authored by 18손재민's avatar 18손재민 Committed by 18류지석

게임 오버 시 넘어지는 애니메이션 재생 wip

parent 39d9f817
......@@ -76,7 +76,7 @@ class GameRoom
{
this.roomId = GameServer.getRoomNumber();
this.roomIndex = -1;
this.startCount = 2;
this.startCount = 3;
this.maxPlayer = 100;
this.nextRank = 100;
......@@ -208,7 +208,7 @@ class GameRoom
{
if (this.currentPhase === GameServer.Phase.START)
{
if (this.phaseChanger < 0 && checkTime - this.startTime > 60000)
if (this.phaseChanger < 0 && checkTime - this.startTime > 10000)
{
this.currentPhase = GameServer.Phase.MAIN;
this.rateArrangePoint = 150;
......
......@@ -116,11 +116,13 @@ socket.on('changePhase', function(msg) // number Phase
WordSpace.pauseCycle(true);
// 여기서 종이 드르륵 열면됨
let phaseChangeBgr = ScenesData.gameScene.add.sprite(game.config.width / 2, game.config.height / 2, 'phaseChangeBgr').setOrigin(0.5, 0.5).setDepth(10);
ScenesData.gameScene.scene.pause('gameScene');
setTimeout(function()
{
ScenesData.gameScene.scene.resume('gameScene');
// 여기서 종이 닫으면됨
phaseChangeBgr.destroy();
WordSpace.pauseCycle(false);
//console.log('start again');
}, 5000);
......
var Enums = Enums || {};
Enums.characterAnim = { sit: 0, write: 1, notBurning: 2, smallBurning: 3, bigBurning: 4, throw: 5, hit: 6 }
Enums.characterAnim = { sit: 0, write: 1, notBurning: 2, smallBurning: 3, bigBurning: 4, throw: 5, hit: 6, gameOver: 7 }
Enums.item = {invincible: "무적", nameList: "명단", charge: "충전", clean: "청소", heavy: "중량", dark: "암흑"}
\ No newline at end of file
......@@ -190,14 +190,15 @@ WordSpace.loadImage = function(scene)
scene.load.image('nameBgr' + i, 'assets/placeholder/name' + i + '.png');
scene.load.image('strongBgr' + i, 'assets/placeholder/strong' + i + '.png');
}
scene.load.spritesheet('wordBreak', 'assets/image/word/wordbreak.png', { frameWidth: 180, frameHeight: 180 });
scene.load.spritesheet('pyeongminSit', 'assets/image/character/pyeongmin/pyeong_sit.png', { frameWidth: 521, frameHeight: 610 });
scene.load.spritesheet('pyeongminWrite', 'assets/image/character/pyeongmin/write/pyeong_write.png', { frameWidth: 521, frameHeight: 610 });
scene.load.spritesheet('pyeongminThrow', 'assets/image/character/pyeongmin/throw/pyeong_throw.png', { frameWidth: 521, frameHeight: 610 });
scene.load.spritesheet('pyeongminBurningSmall', 'assets/image/character/pyeongmin/burning/pyeong_burning_small.png', { frameWidth: 521, frameHeight: 610 });
scene.load.spritesheet('pyeongminBurningBig', 'assets/image/character/pyeongmin/burning/pyeong_burning_big.png', { frameWidth: 521, frameHeight: 610 });
scene.load.image('attackPaper', 'assets/image/etc/paper_crumbled.png');
scene.load.spritesheet('pyeongminGameOver', 'assets/image/character/pyeongmin/burning/pyeong_balladang.png', { frameWidth: 720, frameHeight: 700 });
scene.load.image('phaseChangeBgr', 'assets/placeholder/phaseChange.png');
WordSpace.weightTextObjForTest = scene.add.text(game.config.width * 5 / 64, game.config.height * 5 / 48, '뇌의 무게: (현재) 0 / ' + this.brainCapacity + ' (전체)').setDepth(10).setColor('#000000');
WordSpace.killLogTextForTest = scene.add.text(game.config.width * 25 / 32, game.config.height * 5 / 72, WordSpace.killLogForTest).setDepth(10).setColor('#000000').setAlign('right');
......@@ -254,6 +255,13 @@ WordSpace.loadAnimation = function(scene)
repeat: 0,
hideOnComplete: false
});
WordSpace.pyeongminAnims[Enums.characterAnim.gameOver] = scene.anims.create({
key: 'pyeongminGameOverAnim',
frames: scene.anims.generateFrameNumbers('pyeongminGameOver'),
frameRate: 10,
repeat: 0,
hideOnComplete: false
});
}
WordSpace.generateWord =
......
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