Example #1
0
 public virtual void Show(bool isshow)
 {
     if (null != gameObject)
     {
         U3DMod.SetActive(gameObject, isshow);
     }
 }
Example #2
0
 public void Despawn(U3DObject uobj)
 {
     if (spwanList.Contains(uobj))
     {
         U3DMod.AddChild(null, uobj.gameObject, true);
         uobj.Hide();
         spwanList.Remove(uobj);
         despawnList.Add(uobj);
     }
 }
Example #3
0
 public virtual void Destroy()
 {
     if (DestroyHandler != null)
     {
         DestroyHandler(this);
     }
     if (gameObject != null)
     {
         U3DMod.Destroy(gameObject);
     }
 }
Example #4
0
 public virtual bool isShow()
 {
     if (gameObject != null)
     {
         return(U3DMod.isActive(gameObject));
     }
     else
     {
         return(false);
     }
 }
Example #5
0
        public U3DObject SpawnOne()
        {
            U3DObject uobj = null;

            if (despawnList.Count > 0)
            {
                spwanList.Add(despawnList[0]);
                uobj = despawnList[0];
                despawnList.Remove(uobj);
                uobj.DespawnHandler   = Despawn;
                uobj.OnDestroyHandler = OnDestroy;
            }
            else if (spwanList.Count > 0)
            {
                uobj = U3DMod.Clone <U3DObject>(spwanList[0]);
                spwanList.Add(uobj);
                uobj.DespawnHandler   = Despawn;
                uobj.OnDestroyHandler = OnDestroy;
            }
            return(uobj);
        }
Example #6
0
 public virtual void DestroyThisComponent()
 {
     U3DMod.Destroy(this);
 }