Пример #1
0
        public void ListenShowEffect(object parameter)
        {
            EffectParameter p = parameter as  EffectParameter;

            if (null == p)
            {
                Debug.LogErrorFormat("EffectManager.ListenShowEffect=> {0} is not EffectParamter",
                                     parameter.ToString());
            }

            //Load effect from pool
            BaseEffectExcutor effect = BasePoolManager.GetObject <BaseEffectExcutor>(p.effectName);

            effect.transform.parent   = p.parent;
            effect.transform.position = p.position;
            effect.transform.rotation = p.rotation;
            //effect.transform.localScale = effect.transform.worldToLocalMatrix * Vector3.one;
            effect.transform.localScale = p.scale;
            effect.Play(p.effectName);
        }
Пример #2
0
        IEnumerator ReturnToPool(string effetName)
        {
            yield return(new WaitForSeconds(10f));

            BasePoolManager.ReturnObject(effetName, this.gameObject);
        }