public override void OnEnter()
        {
            sequence.OnFinishedCallback.AddListener(OnSequenceFinished);

            sequence.Speed = speed.Value;
            if (time.Value > 0)
            {
                sequence.Play(time.Value);
            }
            else
            {
                sequence.Play();
            }
        }
Exemple #2
0
 public void AILitterFishKillEnd()
 {
     if (hasPlayerEndSquence2 && !hasPlayerEndSquence3)
     {
         m_FSquence3.Play();
     }
 }
Exemple #3
0
        public void Play(bool restart)
        {
            if (!_sequence.IsStopped && restart)
            {
                _sequence.Stop();
            }



            int frame = _viewRange.Cull(_sequence.GetCurrentFrame());

            _sequence.Play(frame);

            _timeStartedPlaying = EditorApplication.timeSinceStartup - (frame - _viewRange.Start) * _sequence.InverseFrameRate;

            SetCurrentFrame(frame);

            _isPlaying = true;

            FUtility.RepaintGameView();
        }
Exemple #4
0
 void Update()
 {
     if (Shoal.Instance.IsDeath)
     {
         return;
     }
     if (hasPlayerEndSquence1 && !hasPlayerEndSquence2 && !m_FSquence2.IsPlaying)
     {
         m_Squence2Interval -= Time.deltaTime;
         if (m_Squence2Interval < 0)
         {
             m_FSquence2.Play();
         }
     }
     if (hasPlayerEndSquence3 && !hasPlayerEndSquence4 && !m_FSquence4.IsPlaying)
     {
         m_Squence3Interval -= Time.deltaTime;
         if (m_Squence3Interval < 0)
         {
             m_FSquence4.Play();
         }
     }
 }