Exemplo n.º 1
0
        protected override void OnLeaving()
        {
            var tempComponents = new IGameComponent[_subComponents.Count];

            _subComponents.CopyTo(tempComponents, 0);

            foreach (IGameComponent tempComponent in tempComponents)
            {
                _subComponents.Remove(tempComponent);
                _mainComponents.Remove(tempComponent);
            }
        }