IEnumerator TimeoutAnim(float duration)
    {
        float t  = 0;
        float dt = Time.timeScale / duration;

        while ((t += dt * Time.deltaTime) < 1)
        {
            rotator.fillAmount = 1 - t;
            yield return(null);
        }
        rotator.fillAmount = 0;
        Finished.Invoke(this, new TEventArgs <EAnimation>(EAnimation.Timeout));
    }
Exemple #2
0
        public void In()
        {
            EventWrapper eventWrapper = Container.Actor.GetEvent(Name.Value);

            if (eventWrapper != null)
            {
                eventWrapper.Invoke();
            }

            if (Out != null)
            {
                Out();
            }
        }