Exemple #1
0
 public Scene()
 {
     background      = new SceneObj();
     sceneroot       = new SceneObj();
     uilayer         = new SceneObj_UIContainer(this);
     backgroundColor = Color.AliceBlue;
 }
Exemple #2
0
 public Scene()
 {
     background = new SceneObj();
     sceneroot = new SceneObj();
     uilayer = new SceneObj_UIContainer(this);
     backgroundColor = Color.AliceBlue;
 }
Exemple #3
0
        public virtual SceneObj OnCopy()
        {
            SceneObj o = new SceneObj();

            o._pos       = this._pos;
            o._scale     = this._scale;
            o.needUpdate = true;
            return(o);
        }
Exemple #4
0
 public void AddObject(SceneObj obj)
 {
     if (Children == null)
     {
         Children = new List <SceneObj>();
     }
     Children.Add(obj);
     obj.parent = this;
 }
Exemple #5
0
 public void NeedUpdateAll(SceneObj sobj)
 {
     sobj.needUpdate = true;
     if (sobj.Children != null)
     {
         foreach (var o in sobj.Children)
         {
             NeedUpdateAll(o);
         }
     }
 }
Exemple #6
0
        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);
        }
Exemple #7
0
        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);
        }
Exemple #8
0
        public SceneObj Copy()
        {
            SceneObj e = OnCopy();

            if (this.Children != null)
            {
                foreach (var i in this.Children)
                {
                    e.AddObject(i.Copy());
                }
            }
            return(e);
        }
Exemple #9
0
 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);
     }
 }
Exemple #10
0
 public void SetParent(SceneObj obj)
 {
     parent = obj;
 }
Exemple #11
0
 public void RemoveObject(SceneObj obj)
 {
     Children.Remove(obj);
 }
Exemple #12
0
 public void AddObject(SceneObj obj)
 {
     if(Children==null)Children = new List<SceneObj>();
     Children.Add(obj);
     obj.parent = this;
 }
Exemple #13
0
 public void SetParent(SceneObj obj)
 {
     parent = obj;
 }
Exemple #14
0
 public void RemoveObject(SceneObj obj)
 {
     Children.Remove(obj);
 }
Exemple #15
0
 public virtual SceneObj OnCopy()
 {
     SceneObj o = new SceneObj();
     o._pos = this._pos;
     o._scale = this._scale;
     o.needUpdate = true;
     return o;
 }
Exemple #16
0
 public void NeedUpdateAll(SceneObj sobj)
 {
     sobj.needUpdate = true;
     if(sobj.Children!=null)
     foreach (var o in sobj.Children)
     {
         NeedUpdateAll(o);
     }
 }