Example #1
0
    //停止剧情
    public void StopSequencer()
    {
        if (m_SequencerGameObject != null)
        {
            WellFired.USSequencer sequencer = m_SequencerGameObject.GetComponent <WellFired.USSequencer>();
            sequencer.Stop();

            PlaybackFinished(sequencer);
        }
    }
Example #2
0
        public override void FireEvent()
        {
            if (!sequence)
            {
                Debug.LogWarning("No sequence for USstopSequenceEvent : " + name, this);
            }

            if (sequence)
            {
                sequence.Stop();
            }
        }
        public override void FireEvent()
        {
            if (!sequence)
            {
                Debug.LogWarning("No sequence for USstopSequenceEvent : " + name, this);
            }

            if (sequence)
            {
                sequence.Stop();
                sequence.SkipTimelineTo(timeToSkipTo);
                sequence.UpdateSequencer(0.0f);
            }
        }
Example #4
0
 private void StopSequence()
 {
     sequenceToStop.Stop();
 }
Example #5
0
        private void SequenceUpdate()
        {
            if (PropertyBoxPopup.OpenCooldown >= 0.0f)
            {
                var currentTime = Time.realtimeSinceStartup;
                var deltaTime   = currentTime - PreviousTime;
                PropertyBoxPopup.OpenCooldown = PropertyBoxPopup.OpenCooldown - deltaTime;
            }
            PropertyBoxPopup.OpenCooldown = Mathf.Clamp(PropertyBoxPopup.OpenCooldown, 0.0f, 1.0f);

            if (CurrentSequence)
            {
                var currentTime = Time.realtimeSinceStartup;
                var deltaTime   = currentTime - PreviousTime;

                if (Mathf.Abs(deltaTime) > USSequencer.SequenceUpdateRate)
                {
                    if (CurrentSequence.IsPlaying && !Application.isPlaying)
                    {
                        CurrentSequence.UpdateSequencer(deltaTime * Time.timeScale);
                        Repaint();
                    }
                    PreviousTime = currentTime;
                }
            }

            USSequencer nextSequence = null;

            if (Selection.activeGameObject != null && (CurrentSequence == null || Selection.activeGameObject != CurrentSequence.gameObject))
            {
                nextSequence = Selection.activeGameObject.GetComponent <USSequencer>();
                if (nextSequence != null)
                {
                    var isPrefab = PrefabUtility.GetPrefabParent(nextSequence.gameObject) == null && PrefabUtility.GetPrefabObject(nextSequence.gameObject) != null;
                    if (isPrefab)
                    {
                        nextSequence = null;
                    }
                }
            }
            else
            {
                return;
            }

            if (nextSequence == null)
            {
                return;
            }

            if (!Application.isPlaying && CurrentSequence != nextSequence)
            {
                ShowOnlyAnimated = false;

                if (CurrentSequence)
                {
                    CurrentSequence.Stop();
                }

                if (nextSequence)
                {
                    nextSequence.Stop();
                }

                StopProcessingAnimationMode();
            }

            SequenceSwitch(nextSequence);

            Repaint();
        }