Example #1
0
    private void OnTriggerExit(Collider other)
    {
        UnitFowController unit = other.transform.parent.GetComponent <UnitFowController>(); //might have to change

        if (unit != null)
        {
            unit.mySquares.Remove(this);
            myUnits.Remove(unit);
        }
    }
 /// <summary>
 ///     Sends signal that the FOW needs to be updated.
 ///     Adds unit that needs to update into unitlist.
 ///     Called by <see cref="UnitFowController"/>.
 /// </summary>
 public void UpdateFow(UnitFowController sendUnit)
 {
     unitSet.Add(sendUnit);
     fowNeedsUpdate = true;
 }