示例#1
0
    public void DestroyDivision(ControlledDivision other)
    {
        string str = "";

        foreach (var kvp in VisibleDivisions)
        {
            str += kvp.Key + ", ";
        }

        Debug.Log($"Destorying division {other}, from {this}, notifying {str}");
        other.HasBeenDestroyed = true;
        FindAndRemoveSubordinateById(other.DivisionId, ref RememberedDivisions);
        RememberedDivisions[other.DivisionId] = new RememberedDivision(other);
        other.NotifyAllVisibleDivisionsOfDestruction();
        GameObject.Destroy(other.Controller.gameObject);
    }