public EffectObject ActiveObject() { if (pool.Count <= 0) { MakeEffects(5); } EffectObject activeObject = pool.Dequeue(); activeObject.gameObject.SetActive(true); activeObject.CountEffect(); return(activeObject); }
public EffectObject ActiveObject(Vector3 pos) { if (pool.Count <= 0) { MakeEffects(5); } EffectObject activeObject = pool.Dequeue(); activeObject.gameObject.SetActive(true); activeObject.CountEffect(); activeObject.transform.position = pos; return(activeObject); }