Example #1
0
        private void DelayPlayEffect(UIEffectParameters effectParameters, float delay)
        {
            if (delay > Mathf.Epsilon)
            {
                StartCoroutine(PlayOneEffect(effectParameters, delay));
            }
            else
            {
                effectParameters.Effect.Play();
            }

            currentEffect = effectParameters.Effect;
        }
Example #2
0
        private IEnumerator PlayOneEffect(UIEffectParameters effectParameters, float delay)
        {
            yield return(new WaitForSeconds(delay));

            effectParameters.Effect.Play();
        }