Exemple #1
0
 public virtual void Run(SceneTransitionDirection direction, float time, bool destroyOnComplete)
 {
     OnTransitionEnd.Invoke();
     if (destroyOnComplete)
     {
         Destroy(gameObject);
     }
 }
    public override void Run(SceneTransitionDirection direction, float time, bool destroyOnComplete)
    {
        float start = 0;
        float end   = 1;

        if (direction == SceneTransitionDirection.In)
        {
            start = 1;
            end   = 0;
        }
        Debug.Log("Starting fade : " + direction);
        StopAllCoroutines();
        StartCoroutine(DoFade(time, start, end, destroyOnComplete));
    }