예제 #1
0
    void Update()
    {
        if (IsPlaying && CurrentBlend == BlendType.None)
        {
            if (_outTime >= 0 && PlayableDirector.time >= _outTime)
            {
                CurrentBlend = BlendType.Out;

                //Debug.Log($"{name}: Starting Scheduled Blend-Out at {PlayableDirector.time:N2}");
                _sw.Restart();

                StartCoroutine(BlendOut(PlayableDirector, _output, _scheduledBlendOutDuration, _output.GetWeight(), () =>
                {
                    _sw.Stop();
                    //Debug.Log($"{name}: Finished Scheduled Blend-Out after {_sw.Elapsed.TotalSeconds:N3}ms");
                    _scheduledBlendOutCallback?.Invoke();
                    _scheduledBlendOutCallback = null;
                    CurrentBlend = BlendType.None;
                }));
            }
        }
    }