public override IEnumerator CloseTo(SlidingSide side)
        {
            Sequence buttonSequence = m_buttonSlidingAnim.PlayAnim(open: false, side, side == SlidingSide.Right);
            Sequence elemSequence   = m_godList.TransitionAnim(open: false, side);

            m_closeDirector.set_time(0.0);
            m_closeDirector.Play();
            while (true)
            {
                if (!TweenExtensions.IsActive(elemSequence) && !TweenExtensions.IsActive(buttonSequence))
                {
                    PlayableGraph playableGraph = m_closeDirector.get_playableGraph();
                    if (!playableGraph.IsValid())
                    {
                        break;
                    }
                    playableGraph = m_closeDirector.get_playableGraph();
                    if (playableGraph.IsDone())
                    {
                        break;
                    }
                }
                yield return(null);
            }
        }
        public override IEnumerator OpenFrom(SlidingSide side)
        {
            for (int i = 0; i < m_slidingAnim.elements.Count; i++)
            {
                m_slidingAnim.elements[i].get_transform().set_localPosition(Vector3.get_zero());
            }
            Sequence slidingSequence = m_slidingAnim.PlayAnim(open: true, side, side == SlidingSide.Left);

            m_openDirector.set_time(0.0);
            m_openDirector.Play();
            while (true)
            {
                if (!TweenExtensions.IsActive(slidingSequence))
                {
                    PlayableGraph playableGraph = m_openDirector.get_playableGraph();
                    if (!playableGraph.IsValid())
                    {
                        break;
                    }
                    playableGraph = m_openDirector.get_playableGraph();
                    if (playableGraph.IsDone())
                    {
                        break;
                    }
                }
                yield return(null);
            }
        }
Exemple #3
0
 private unsafe void ShowCategory(OptionCategory selectedCategory)
 {
     //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
     //IL_00af: Expected O, but got Unknown
     //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
     //IL_00d5: Expected O, but got Unknown
     if (selectedCategory == m_selectedCategory)
     {
         return;
     }
     if (m_transitionTweenSequence != null && TweenExtensions.IsActive(m_transitionTweenSequence))
     {
         TweenExtensions.Kill(m_transitionTweenSequence, false);
         if (m_previousCategory != null)
         {
             m_previousCategory.SetVisible(value: false);
         }
     }
     m_previousCategory        = m_selectedCategory;
     m_selectedCategory        = selectedCategory;
     m_transitionTweenSequence = DOTween.Sequence();
     if (m_previousCategory != null)
     {
         TweenSettingsExtensions.Append(m_transitionTweenSequence, m_previousCategory.DoFade(0f, m_transitionDuration));
         TweenSettingsExtensions.AppendCallback(m_transitionTweenSequence, new TweenCallback((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
     }
     if (m_selectedCategory != null)
     {
         TweenSettingsExtensions.AppendCallback(m_transitionTweenSequence, new TweenCallback((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
         TweenSettingsExtensions.Append(m_transitionTweenSequence, m_selectedCategory.DoFade(1f, m_transitionDuration));
     }
 }
Exemple #4
0
        public Sequence Open()
        {
            //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
            //IL_0103: Unknown result type (might be due to invalid IL or missing references)
            //IL_015a: Unknown result type (might be due to invalid IL or missing references)
            if (m_openTweenSequence != null && TweenExtensions.IsActive(m_openTweenSequence))
            {
                TweenExtensions.Kill(m_openTweenSequence, false);
            }
            m_openTweenSequence = DOTween.Sequence();
            int   num            = m_statLines.Count + 2;
            float num2           = Mathf.Min(m_statData.openBoardDuration, m_statData.openBoardLineTweenDuration);
            float num3           = (m_statData.openBoardDuration - num2) / (float)num;
            float openBoardDelay = m_statData.openBoardDelay;

            m_playerLine.canvasGroup.set_alpha(0f);
            TweenSettingsExtensions.Insert(m_openTweenSequence, openBoardDelay, TweenSettingsExtensions.SetEase <Tweener>(DOTweenModuleUI.DOFade(m_playerLine.canvasGroup, 1f, num2), m_statData.openBoardLineTweenEase));
            openBoardDelay += num3;
            for (int i = 0; i < m_statLines.Count; i++)
            {
                StatValueLine statValueLine = m_statLines[i];
                statValueLine.canvasGroup.set_alpha(0f);
                TweenSettingsExtensions.Insert(m_openTweenSequence, openBoardDelay, TweenSettingsExtensions.SetEase <Tweener>(DOTweenModuleUI.DOFade(statValueLine.canvasGroup, 1f, num2), m_statData.openBoardLineTweenEase));
                openBoardDelay += num3;
            }
            m_teamScoreLine.set_alpha(0f);
            TweenSettingsExtensions.Insert(m_openTweenSequence, openBoardDelay, TweenSettingsExtensions.SetEase <Tweener>(DOTweenModuleUI.DOFade(m_teamScoreLine, 1f, num2), m_statData.openBoardLineTweenEase));
            return(m_openTweenSequence);
        }
Exemple #5
0
        public override IEnumerator OpenCoroutine()
        {
            Sequence boardSequence = m_statBoard.Open();

            yield return(base.OpenCoroutine());

            while (TweenExtensions.IsActive(boardSequence) || TweenExtensions.IsActive(boardSequence))
            {
                yield return(null);
            }
        }
        public Sequence PlayAnim(bool open, SlidingSide side, bool reverseElementOrder = false)
        {
            //IL_0080: Unknown result type (might be due to invalid IL or missing references)
            //IL_0085: Unknown result type (might be due to invalid IL or missing references)
            //IL_0088: Unknown result type (might be due to invalid IL or missing references)
            //IL_008d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0093: Unknown result type (might be due to invalid IL or missing references)
            //IL_0095: Unknown result type (might be due to invalid IL or missing references)
            //IL_0097: Unknown result type (might be due to invalid IL or missing references)
            //IL_009e: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ac: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
            //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
            //IL_00bd: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e0: Unknown result type (might be due to invalid IL or missing references)
            if (m_transitionTweenSequence != null && TweenExtensions.IsActive(m_transitionTweenSequence))
            {
                TweenExtensions.Kill(m_transitionTweenSequence, false);
            }
            SlidingAnimUIConfig slidingAnimUIConfig = open ? openConfig : closeConfig;

            m_transitionTweenSequence = DOTween.Sequence();
            float num = slidingAnimUIConfig.delay;

            for (int i = 0; i < elements.Count; i++)
            {
                int           index             = reverseElementOrder ? (elements.Count - 1 - i) : i;
                CanvasGroup   val               = elements[index];
                RectTransform val2              = val.get_transform() as RectTransform;
                Vector2       anchoredPosition  = val2.get_anchoredPosition();
                Vector2       anchorOffset      = slidingAnimUIConfig.anchorOffset;
                Vector2       val3              = (side == SlidingSide.Right) ? (anchoredPosition + anchorOffset) : (anchoredPosition - anchorOffset);
                Vector2       anchoredPosition2 = open ? val3 : anchoredPosition;
                Vector2       val4              = open ? anchoredPosition : val3;
                if (open)
                {
                    val.set_alpha(0f);
                }
                val2.set_anchoredPosition(anchoredPosition2);
                TweenSettingsExtensions.Insert(m_transitionTweenSequence, num, TweenSettingsExtensions.SetEase <Tweener>(DOTweenModuleUI.DOAnchorPos(val2, val4, slidingAnimUIConfig.duration, false), slidingAnimUIConfig.positionCurve));
                TweenSettingsExtensions.Insert(m_transitionTweenSequence, num, TweenSettingsExtensions.SetEase <Tweener>(DOTweenModuleUI.DOFade(val, slidingAnimUIConfig.endAlpha, slidingAnimUIConfig.duration), slidingAnimUIConfig.alphaCurve));
                num += slidingAnimUIConfig.elementDelayOffset;
            }
            return(m_transitionTweenSequence);
        }
Exemple #7
0
 public unsafe void SetEmpty(bool tween = false)
 {
     playerId = -1L;
     if (m_tween != null && TweenExtensions.IsActive(m_tween))
     {
         TweenExtensions.Kill(m_tween, false);
     }
     if (tween)
     {
         m_tween = DOVirtual.Float(stateValue, 0f, m_closeTransitionDuration, new TweenCallback <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
     }
     else
     {
         UpdateState(0f);
     }
 }
 public unsafe void PlayFeedback()
 {
     //IL_0027: Unknown result type (might be due to invalid IL or missing references)
     //IL_00d1: Unknown result type (might be due to invalid IL or missing references)
     //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
     //IL_0108: Expected O, but got Unknown
     if (m_sequence != null && TweenExtensions.IsActive(m_sequence))
     {
         TweenExtensions.Kill(m_sequence, false);
     }
     this.get_transform().set_localScale(Vector3.get_one());
     SetAlpha(1f);
     m_target.set_enabled(true);
     m_sequence = DOTween.Sequence();
     TweenSettingsExtensions.Insert(m_sequence, 0f, DOTween.To(new DOGetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new DOSetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), 0f, m_tweenDuration));
     TweenSettingsExtensions.Insert(m_sequence, 0f, TweenSettingsExtensions.SetDelay <TweenerCore <Vector3, Vector3, VectorOptions> >(DOTween.To(_003C_003Ec._003C_003E9__2_0 ?? (_003C_003Ec._003C_003E9__2_0 = new DOGetter <Vector3>((object)_003C_003Ec._003C_003E9, (IntPtr)(void *) /*OpCode not supported: LdFtn*/)), new DOSetter <Vector3>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new Vector3(5f, 5f, 5f), m_tweenDuration), 0f));
     TweenSettingsExtensions.OnComplete <Sequence>(m_sequence, new TweenCallback((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
 }
Exemple #9
0
 public unsafe void Set(string nickname, int level, SquadFakeData fakeData, bool tween = false)
 {
     level = 6;
     m_illu.set_sprite(fakeData.illu);
     m_name.SetText(nickname);
     m_level.SetText($"Niveau {level}");
     if (m_tween != null && TweenExtensions.IsActive(m_tween))
     {
         TweenExtensions.Kill(m_tween, false);
     }
     if (tween)
     {
         m_tween = DOVirtual.Float(stateValue, 1f, m_openTransitionDuration, new TweenCallback <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
     }
     else
     {
         UpdateState(1f);
     }
 }
Exemple #10
0
        private unsafe void RefreshTimeFilling()
        {
            //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c1: Unknown result type (might be due to invalid IL or missing references)
            //IL_0170: Unknown result type (might be due to invalid IL or missing references)
            if (!m_running || Mathf.Approximately(m_turnDuration, 0f))
            {
                m_timeFilling.set_fillAmount(0f);
                return;
            }
            float num = Time.get_unscaledTime() - m_turnStartTime;

            m_timeFilling.set_fillAmount(Mathf.Clamp01(num / m_turnDuration));
            if (m_turnDuration - num <= 10f)
            {
                m_chronoText.get_gameObject().SetActive(true);
                m_text.get_gameObject().SetActive(false);
                int num2 = (int)(m_turnDuration - num);
                if (m_previousSecond != num2)
                {
                    m_chronoText.text = num2.ToString();
                    m_chronoText.get_transform().set_localScale(Vector3.get_one() * 5f);
                    if (m_sequence != null && TweenExtensions.IsActive(m_sequence))
                    {
                        TweenExtensions.Kill(m_sequence, false);
                    }
                    SetAlpha(0f);
                    m_sequence = DOTween.Sequence();
                    TweenSettingsExtensions.Insert(m_sequence, 0f, DOTween.To(new DOGetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new DOSetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), 1f, 0.3f));
                    TweenSettingsExtensions.Insert(m_sequence, 0f, TweenSettingsExtensions.SetDelay <TweenerCore <Vector3, Vector3, VectorOptions> >(DOTween.To(_003C_003Ec._003C_003E9__20_1 ?? (_003C_003Ec._003C_003E9__20_1 = new DOGetter <Vector3>((object)_003C_003Ec._003C_003E9, (IntPtr)(void *) /*OpCode not supported: LdFtn*/)), new DOSetter <Vector3>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), Vector3.get_one(), 0.3f), 0f));
                }
                m_previousSecond = num2;
            }
            else
            {
                m_chronoText.get_gameObject().SetActive(false);
                m_text.get_gameObject().SetActive(true);
            }
        }
Exemple #11
0
        public override IEnumerator OpenFrom(SlidingSide side)
        {
            Sequence elemSequence = m_slidingAnim.PlayAnim(open: true, side, side == SlidingSide.Left);

            m_openDirector.set_time(0.0);
            m_openDirector.Play();
            while (true)
            {
                if (!TweenExtensions.IsActive(elemSequence))
                {
                    PlayableGraph playableGraph = m_openDirector.get_playableGraph();
                    if (!playableGraph.IsValid())
                    {
                        break;
                    }
                    playableGraph = m_openDirector.get_playableGraph();
                    if (playableGraph.IsDone())
                    {
                        break;
                    }
                }
                yield return(null);
            }
        }
Exemple #12
0
        protected override void DoStateTransition(SelectionState state, bool instant)
        {
            //IL_004a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0060: Expected I4, but got Unknown
            //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
            //IL_00da: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e5: Unknown result type (might be due to invalid IL or missing references)
            //IL_0106: Unknown result type (might be due to invalid IL or missing references)
            //IL_016a: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ca: Unknown result type (might be due to invalid IL or missing references)
            //IL_020d: Unknown result type (might be due to invalid IL or missing references)
            if (!this.get_gameObject().get_activeInHierarchy())
            {
                return;
            }
            if (m_style == null)
            {
                Log.Error("AnimatedTextButton " + this.get_name() + " doesn't have a style defined !", 69, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Demo\\Code\\UI\\GameSelection\\GameSelectionButton.cs");
                return;
            }
            GameSelectionButtonState gameSelectionButtonState = m_style.disable;

            switch ((int)state)
            {
            case 0:
                gameSelectionButtonState = ((!m_anotherButtonIsHightlighted) ? m_style.normal : m_style.normalButAnotherIsHighlighted);
                break;

            case 1:
                gameSelectionButtonState = m_style.highlight;
                break;

            case 2:
                gameSelectionButtonState = m_style.pressed;
                break;

            case 3:
                gameSelectionButtonState = m_style.disable;
                break;
            }
            if (instant)
            {
                if (Object.op_Implicit(m_image))
                {
                    m_image.set_color(gameSelectionButtonState.imageColor);
                    m_image.get_transform().set_localScale(Vector3.get_one() * gameSelectionButtonState.scale);
                }
                if (Object.op_Implicit(m_outline))
                {
                    m_outline.set_color(gameSelectionButtonState.outlineColor);
                }
                return;
            }
            int i = 0;

            for (int count = m_currentTweens.Count; i < count; i++)
            {
                Tweener val = m_currentTweens[i];
                if (TweenExtensions.IsActive(val))
                {
                    TweenExtensions.Kill(val, false);
                }
            }
            m_currentTweens.Clear();
            if (Object.op_Implicit(m_image))
            {
                m_currentTweens.Add(DOTweenModuleUI.DOColor(m_image, gameSelectionButtonState.imageColor, m_style.transitionDuration));
                m_currentTweens.Add(ShortcutExtensions.DOScale(m_image.get_transform(), gameSelectionButtonState.scale, m_style.transitionDuration));
            }
            if (Object.op_Implicit(m_outline))
            {
                m_currentTweens.Add(DOTweenModuleUI.DOBlendableColor(m_outline, gameSelectionButtonState.outlineColor, m_style.transitionDuration));
            }
            int j = 0;

            for (int count2 = m_currentTweens.Count; j < count2; j++)
            {
                Tweener val2 = m_currentTweens[j];
                TweenSettingsExtensions.SetEase <Tweener>(val2, m_style.ease);
                if (m_delayAnim)
                {
                    TweenSettingsExtensions.SetDelay <Tweener>(val2, m_style.fromNormalAndUnHighlightedDelay);
                }
            }
        }