/// <summary> /// 从场景移除一个物体 /// </summary> /// <param name="obj"></param> public virtual void RemoveObj(BaseObject obj) { _baseObjects.Remove(obj); this.Children.Remove(obj); }
/// <summary> /// 添加一个物体到场景 /// </summary> /// <param name="obj"></param> public virtual void AddObj(BaseObject obj) { _baseObjects.Add(obj); this.Children.Add(obj); }
/// <summary> /// 删除一个物体 /// </summary> /// <param name="obj"></param> public void RemoveObj(BaseObject obj) { _objs.Remove(obj); this.Children.Remove(obj); }
/// <summary> /// 添加一个物体,该物体会在主循环中执行自己的逻辑 /// </summary> /// <param name="obj"></param> public void AddObj(BaseObject obj) { _objs.Add(obj); this.Children.Add(obj); }