public Scene() { background = new SceneObj(); sceneroot = new SceneObj(); uilayer = new SceneObj_UIContainer(this); backgroundColor = Color.AliceBlue; }
public virtual SceneObj OnCopy() { SceneObj o = new SceneObj(); o._pos = this._pos; o._scale = this._scale; o.needUpdate = true; return(o); }
public void AddObject(SceneObj obj) { if (Children == null) { Children = new List <SceneObj>(); } Children.Add(obj); obj.parent = this; }
public void NeedUpdateAll(SceneObj sobj) { sobj.needUpdate = true; if (sobj.Children != null) { foreach (var o in sobj.Children) { NeedUpdateAll(o); } } }
public void SetPic(SceneObj front, SceneObj back) { this.front = front; orcfrontscale = front.scale; this.front.pos = new Vector2(0, 0); this.back = back; orcbackscale = back.scale; this.back.pos = new Vector2(0, 0); this.AddObject(back); this.AddObject(front); }
public void SetPic(SceneObj front, SceneObj back) { this.front = front; orcfrontscale = front.scale; this.front.pos = new Vector2(0, 0); this.back = back; orcbackscale =back.scale; this.back.pos =new Vector2(0,0); this.AddObject(back); this.AddObject(front); }
public SceneObj Copy() { SceneObj e = OnCopy(); if (this.Children != null) { foreach (var i in this.Children) { e.AddObject(i.Copy()); } } return(e); }
public void AddObject(SceneObj obj, ObjShowStyle s) { if (s == ObjShowStyle.ShowAllTime) { this.AddObject(obj); } else if (s == ObjShowStyle.ShowInFold) { foldElement.AddObject(obj); } else if (s == ObjShowStyle.ShowInUnFold) { unfoldElement.AddObject(obj); } }
public void SetParent(SceneObj obj) { parent = obj; }
public void RemoveObject(SceneObj obj) { Children.Remove(obj); }
public void AddObject(SceneObj obj) { if(Children==null)Children = new List<SceneObj>(); Children.Add(obj); obj.parent = this; }
public virtual SceneObj OnCopy() { SceneObj o = new SceneObj(); o._pos = this._pos; o._scale = this._scale; o.needUpdate = true; return o; }
public void NeedUpdateAll(SceneObj sobj) { sobj.needUpdate = true; if(sobj.Children!=null) foreach (var o in sobj.Children) { NeedUpdateAll(o); } }