示例#1
0
 public virtual void Recycle()
 {
     if (GetObj().transform.parent == null)
     {
         if (recycleAble == true)
         {
             BulletPool.Put(gameObject);
             gameObject.SetActive(false);
         }
     }
 }
示例#2
0
文件: Missle.cs 项目: hhhnnnk/Barrage
 public override void Recycle()
 {
     if (transform.parent == null)
     {
         if (recycleAble == true)
         {
             Transform trail = transform.GetChild(0);
             trail.SetParent(null);
             Destroy(trail.gameObject, 3);
             BulletPool.Put(gameObject);
             gameObject.SetActive(false);
         }
     }
 }