Esempio n. 1
0
 public void Despawn(U3DObject uobj)
 {
     if (spwanList.Contains(uobj))
     {
         U3DMod.AddChild(null, uobj.gameObject,true);
         uobj.Hide();
         spwanList.Remove(uobj);
         despawnList.Add(uobj);
     }
 }
Esempio n. 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);
     }
 }
Esempio n. 3
0
        public void OnDestroy(U3DObject uobj)
        {
            if (spwanList.Contains(uobj))
            {
                spwanList.Remove(uobj);
            }

            if (despawnList.Contains(uobj))
            {
                despawnList.Remove(uobj);
            }
        }
Esempio n. 4
0
        public void OnDestroy(U3DObject uobj)
        {
            if (spwanList.Contains(uobj))
            {
                spwanList.Remove(uobj);
            }

            if (despawnList.Contains(uobj))
            {
                despawnList.Remove(uobj);
            }
        }
Esempio n. 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);
        }
Esempio n. 6
0
        public List<U3DObject> spwanList; //池外元素

        #endregion Fields

        #region Constructors

        public U3dCache( U3DObject uobj )
        {
            spwanList = new List<U3DObject>();
            despawnList = new List<U3DObject>();
            despawnList.Add(uobj);
        }
Esempio n. 7
0
        public List <U3DObject> despawnList; //池内元素

        public U3dCache(U3DObject uobj)
        {
            spwanList   = new List <U3DObject>();
            despawnList = new List <U3DObject>();
            despawnList.Add(uobj);
        }