public async void SetCellData(BattleUnitObject unit) { var sprite = await AssetsController.LoadAsset <Sprite>(unit.Data.IconRef); SetCellBg(unit.Team); SetCellIcon(sprite); }
private bool IsHealTarget(BattleUnitObject unit) { var isAlly = ActiveUnit.Team == BattleUnitTeamType.Ally; var isAttackHeal = ActiveUnit.Data.AttackType == AttackType.Heal; var isNeedHeal = unit.CurrentHealth < unit.Data.Health; return(isAlly && isAttackHeal && isNeedHeal); }
public async void SetUnitData(BattleUnitObject unit) { Unit = unit; var sprite = await AssetsController.LoadAsset <Sprite>(unit.Data.IconRef); SetUnitIcon(sprite); SetUnitTeam(unit.Team); Unit.OnSetHealth += StartHealthBarAnimation; }
private bool IsAttackTarget(BattleUnitObject unit) { return(ActiveUnit.Team == BattleUnitTeamType.Ally && unit.IsAlive); }