Commit 145c961d authored by 18손재민's avatar 18손재민

Merge branch 'server' into wordspace

parents fca72f70 dfca8a59
......@@ -123,6 +123,7 @@ var gameScene = new Phaser.Class(
});
console.log(RoomData.myself);
WordSpace.test = WordSpace.generateWord.Name(this, false, null);
WordSpace.attackGauge.add(11);
},
update: function()
......
......@@ -30,7 +30,7 @@ class WordObject
}
else
{
this.physicsObj = scene.physics.add.sprite(random.x, random.y, 'nameBgr' + Math.min(Math.max(2, this.wordText.length), 6))
this.physicsObj = scene.physics.add.sprite(random.x, random.y, (this.isStrong ? 'strongBgr' : 'nameBgr') + Math.min(Math.max(2, this.wordText.length), 6))
.setMass(this.wordWeight * 10)
.setScale(this.scale)
.setFrictionX(0)
......@@ -158,6 +158,7 @@ class AttackWord extends WordObject
}
if(WordSpace.gameTimer.now < this.counterTime)
{
console.log(this.attacker);
let tempWord = WordSpace.generateWord.Name(ScenesData.gameScene, true, this.attacker);
tempWord.destroy();
}
......
......@@ -238,6 +238,7 @@ WordSpace.loadImage = function(scene)
for (let i = 2; i < 7; i++)
{
scene.load.image('nameBgr' + i, 'assets/placeholder/name' + i + '.png');
scene.load.image('strongBgr' + i, 'assets/placeholder/strong' + i + '.png');
}
WordSpace.weightTextObjForTest = scene.add.text(100, 75, '뇌의 무게: (현재) 0 / 100 (전체)').setDepth(10).setColor('#000000');
......@@ -406,7 +407,7 @@ WordSpace.attack = function(wordText, grade)
let attackData =
{
roomNum: RoomData.roomNum,
attacker: PlayerData,
attacker: RoomData.myself,
target: element.ownerId,
text: wordText,
grade: grade,
......
......@@ -89,7 +89,7 @@ io.on('connection', function(socket)
{
let dataToPush =
{
attackerId: msg.attacker.idNum,
attackerId: msg.attacker.id,
attacker: msg.attacker.nickname,
word: msg.text,
wordGrade: msg.grade,
......
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