Ejemplo n.º 1
0
        public override void Heal()
        {
            var cells = AllyCells
                        .Where(x => x.Unit.CurrentHealth < x.Unit.Data.Health)
                        .ToList();
            var random = new Random().Next(0, cells.Count);

            BattleUnitsView.TargetCell = cells[random];
            ProjectileSpawner.CreateHealProjectile(base.Heal);
        }
        public override void OnPointerClick(PointerEventData eventData)
        {
            var target = GetComponent <UnitCellView>();

            if (!IsHealTarget(target.Unit) || !IsPlayerCanTurn)
            {
                return;
            }

            IsPlayerCanTurn            = false;
            BattleUnitsView.TargetCell = target;
            ProjectileSpawner.CreateHealProjectile(ActiveCell.Behaviour.Heal);

            base.OnPointerClick(eventData);
        }