/// <summary> /// 增加物体 /// </summary> /// <param name="obj"></param> /// <param name="name">物体名</param> protected void AddObj(BaseObj obj, string name) { obj.MyName = name; AddObj(obj); }
/// <summary> /// 清除物体 /// </summary> /// <param name="obj"></param> protected void RemoveObj(BaseObj obj) { objects.Remove(obj); this.Children.Remove(obj); }
/// <summary> /// 增加物体 /// </summary> /// <param name="obj"></param> protected void AddObj(BaseObj obj) { objects.Add(obj); obj.setLayer(this); this.Children.Add(obj); }