コード例 #1
0
        protected override void OnUpdate(float time)
        {
            var lerpColor = color;

            lerpColor.a = Easing.Ease(interpolation, 0, color.a, GetClipWeight(time));
            DirectorGUI.UpdateOverlayText(text, lerpColor, size, anchor, position);
        }
コード例 #2
0
ファイル: ScreenFader.cs プロジェクト: guccang/GamePlayLab
        protected override void OnUpdate(float deltaTime)
        {
            var color = outColor;

            color.a = Easing.Ease(interpolation, 0, 1, GetClipWeight(deltaTime) * fade);
            DirectorGUI.UpdateFade(color);
        }
コード例 #3
0
        protected override void OnUpdate(float deltaTime)
        {
            var lerpColor = color;

            lerpColor.a = Easing.Ease(interpolation, 0, color.a, GetClipWeight(deltaTime));
            DirectorGUI.UpdateSubtitles(text, lerpColor);
        }
コード例 #4
0
        protected override void OnUpdate(float deltaTime)
        {
            var lerpColor = color;

            lerpColor.a = Easing.Ease(interpolation, 0, color.a, GetClipWeight(deltaTime));
            DirectorGUI.UpdateOverlayImage(texture, lerpColor, scale, position);
        }
コード例 #5
0
ファイル: PlayAudio.cs プロジェクト: jonntd/Xbl
        protected override void OnUpdate(float time, float previousTime)
        {
            if (_PlayOver)
            {
                return;
            }
            if (audioClip == null)
            {
                return;
            }
            if (source != null && !_PlayLoop)
            {
                float currentTimeLength = time - clipOffset;
                if (currentTimeLength > audioClip.length)
                {
                    _PlayOver = true;
                    return;
                }
                var weight      = Easing.Ease(EaseType.QuadraticInOut, 0, 1, GetClipWeight(time));
                var totalVolume = weight * volume * track.weight;

                AudioSampler.Sample(source, audioClip, currentTimeLength, previousTime - clipOffset, totalVolume, track.ignoreTimeScale);
                source.panStereo = Mathf.Clamp01(stereoPan + track.stereoPan);
                source.loop      = _PlayLoop;
                if (!string.IsNullOrEmpty(subtitlesText))
                {
                    var lerpColor = subtitlesColor;
                    lerpColor.a = weight;
                    DirectorGUI.UpdateSubtitles(string.Format("{0}{1}", parent is ActorAudioTrack? (actor.name + ": ") : "", subtitlesText), lerpColor);
                }
            }
        }
コード例 #6
0
        protected override void OnUpdate(float time, float previousTime)
        {
            if (source != null)
            {
                var weight   = Easing.Ease(EaseType.QuadraticInOut, 0, 1, GetClipWeight(time));
                var settings = track.sampleSettings;
                settings.volume *= weight * volume;
                settings.pitch  *= pitch;
                settings.pan    += stereoPan;

                AudioSampler.Sample(source, audioClip, time - clipOffset, previousTime - clipOffset, settings);

                if (AutoJawSync != null)
                {
                    AutoJawSync.SyncUpdate();
                }

                if (!string.IsNullOrEmpty(subtitlesText))
                {
                    var lerpColor = subtitlesColor;
                    lerpColor.a = weight;
                    DirectorGUI.UpdateSubtitles(string.Format("{0}{1}", parent is ActorAudioTrack ? (actor.name.Replace("(Clone)", "") + ": ") : "", subtitlesText), lerpColor);
                }
            }
        }
コード例 #7
0
ファイル: CineBox.cs プロジェクト: blueinsert/Unity3DStudy
 protected override void OnUpdate(float time)
 {
     DirectorGUI.UpdateLetterbox(GetClipWeight(time));
 }
コード例 #8
0
ファイル: ScreenFader.cs プロジェクト: guccang/GamePlayLab
 protected override void OnReverse()
 {
     DirectorGUI.UpdateFade(lastColor);
 }