Пример #1
0
    public EffectObject ActiveObject()
    {
        if (pool.Count <= 0)
        {
            MakeEffects(5);
        }

        EffectObject activeObject = pool.Dequeue();

        activeObject.gameObject.SetActive(true);
        activeObject.CountEffect();
        return(activeObject);
    }
Пример #2
0
    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);
    }