Fix hitbox bug

This commit is contained in:
Mashy 2019-03-29 20:26:54 +10:00
parent f7daa96550
commit c90d7afc9d

View File

@ -72,10 +72,9 @@ class CombatHitBox extends Phaser.Scene {
this.game.events.emit('SEND_SKILL', game.id, activeSkill.cryp.id, c.id, activeSkill.skill.skill);
}
};
const crypSpawn = group.children.entries.find(s => s.cryp.id === c.id);
const team = c.account === account.id ? 0 : 1;
this.add.existing(new CrypHitBox(this, crypSpawn.iter, team, cback));
if (crypSpawn) this.add.existing(new CrypHitBox(this, crypSpawn.iter, team, cback));
});
});
this.scene.moveBelow('Combat');