Example #1
0
        /// <summary>
        /// The remove component.
        /// </summary>
        /// <param name="sceneComponent">
        /// The scene component.
        /// </param>
        public virtual void RemoveComponent(SceneComponent sceneComponent)
        {
            if (sceneComponent is DrawableSceneComponent)
            {
                var dsc = (DrawableSceneComponent)sceneComponent;
                ObjectManager.RemoveDrawableSceneComponent(this.ID, ref dsc);

                // this.drawableSceneComponents.Add((DrawableSceneComponent)sceneComponent);
            }
            else
            {
                ObjectManager.RemoveSceneComponent(this.ID, ref sceneComponent);

                // this.sceneComponents.Add(sceneComponent);
            }

            this.Game.Components.Remove(sceneComponent);
        }