status text
This commit is contained in:
@@ -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}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user