/// <summary> /// The add drawable game component. /// </summary> /// <param name="sceneComponent"> /// The sceneComponent. /// </param> public virtual void AddComponent(SceneComponent sceneComponent) { sceneComponent.SetScene(this); if (sceneComponent is DrawableSceneComponent) { var dsc = (DrawableSceneComponent)sceneComponent; ObjectManager.AddDrawableSceneComponent(this.ID, ref dsc); dsc.DrawOrderChanged += this.ComponentDrawOrderChanged; } ObjectManager.AddSceneComponent(this.ID, ref sceneComponent); sceneComponent.UpdateOrderChanged += this.ComponentUpdateOrderChanged; }