status text

This commit is contained in:
ntr
2018-12-31 17:07:17 +11:00
parent 19c23c4f97
commit d7f4400a1b
2 changed files with 8 additions and 19 deletions
+5 -10
View File
@@ -248,19 +248,14 @@ class CombatCryps extends Phaser.Scene {
}
updateCrypStatus(status) {
const targetCryp = this.cryps.children.entries
const sourceCryp = this.cryps.children.entries
.find(c => c.cryp.id === status.id);
if (this.phase === 'Skill') {
targetCryp.statusText.text = status.target === targetCryp.cryp.account
? `${status.skill} on ally team`
: `${status.skill} on enemy team`;
}
const targetCryp = this.cryps.children.entries
.find(c => c.cryp.id === status.target);
if (this.phase === 'Target') {
const sourceCryp = this.cryps.children.entries
.find(c => c.cryp.id === status.skill.source_cryp_id);
targetCryp.statusText.text = `${sourceCryp.cryp.name} ${status.skill.skill} ${targetCryp.cryp.name}`;
if (this.phase === 'Skill') {
sourceCryp.statusText.text = `${status.skill} on ${targetCryp.cryp.name}`;
}
}