Beispiel #1
0
        void LateUpdate()
        {
            if (0 < m_DoOnNextUpdate.Count)
            {
                var array = m_DoOnNextUpdate.ToArray();
                m_DoOnNextUpdate.Clear();

                foreach (var t in array)
                {
                    switch (t.m_StateOnEnable)
                    {
                    case StateOnEnable.Hide:
                        t.Hide(PlayMode.Play);
                        break;

                    case StateOnEnable.HideAlways:
                        t.Hide(PlayMode.Replay);
                        break;

                    case StateOnEnable.HideSkipped:
                        t.Hide(PlayMode.Skip);
                        break;

                    case StateOnEnable.Show:
                        t.Show(PlayMode.Play);
                        break;

                    case StateOnEnable.ShowAlways:
                        t.Show(PlayMode.Replay);
                        break;

                    case StateOnEnable.ShowSkipped:
                        t.Show(PlayMode.Skip);
                        break;
                    }
                }
            }


            if (!isPlaying)
            {
                return;
            }

            var anim = m_TransitionData.animationDatas.FirstOrDefault(x => x.m_State == state);

            if (anim != null)
            {
                bool onceOnly = state != State.Idle;
                helper.Update(this, anim.tweenDatas, false, state == State.Show, onceOnly);
                isPlaying = helper.isPlaying;
            }
            else
            {
                helper.Stop();
                isPlaying = false;
            }
        }
Beispiel #2
0
 public void Stop()
 {
     helper.Stop();
     isPlaying = false;
 }