Example #1
0
    public void AoeDamage(float range, GridSlot slot)
    {
        ConsumeActions(2);
        // Make aoe dmg in range
        GridSlot[] slots = GridSlot.GetSlotsInRange(slot, range);

        // Note: also damages allies.
        // Note: Doesn't work if units aren't on slot!
        for (int i = 0; i < slots.Length; i++)
        {
            if (slots[i].taken)
            {
                slots[i].taken.Damage(1);
            }
        }
    }