예제 #1
0
        internal void RemoveStarship(Starship starship)
        {
            int index = Starships.IndexOf(starship);

            if (index > -1)
            {
                Transforms.RemoveAt(index);
                Starships.RemoveAt(index);
            }
            if (Starships.Count == 0)
            {
                isDevastated = true;
                OnTeamDevastated?.Invoke(this);
            }
        }
예제 #2
0
        private void OnStarshipDeath(Transform Tr)
        {
            if (Transforms.Contains(Tr))
            {
                int g = Transforms.IndexOf(Tr);
                Starships.RemoveAt(g);
                Transforms.RemoveAt(g);

                if (Starships.Count == 0)
                {
                    isDevastated = true;
                    OnTeamDevastated?.Invoke(this);
                }
            }
        }
예제 #3
0
 internal void RemoveAllStarships()
 {
     Starships.Clear();
     Transforms.Clear();
     OnTeamDevastated?.Invoke(this);
 }