Example #1
0
    void _DestroyObject(OTObject o, string pool)
    {
		if (o==null) return;
        _RemoveObject(o);
        if (pool != "" && objectPooling)
        {
            o.Dispose();
            _ToObjectPool(pool, o.gameObject);
        }
        else
        {
            if (o.gameObject != null)
			{
				if (o.passive)
					o.passive = false;
                Destroy(o.gameObject);
			}
        }
    }
Example #2
0
 void _DestroyObject(OTObject o, string pool)
 {
     _RemoveObject(o);
     if (pool != "" && objectPooling)
     {
         o.Dispose();
         _ToObjectPool(pool, o.gameObject);
     }
     else
     {
         if (o.gameObject != null)
             Destroy(o.gameObject);
     }
 }