private void SetIsOn(bool isOn, bool instant)
 {
     //IL_0024: Unknown result type (might be due to invalid IL or missing references)
     //IL_002b: Unknown result type (might be due to invalid IL or missing references)
     //IL_0030: Unknown result type (might be due to invalid IL or missing references)
     //IL_0046: Unknown result type (might be due to invalid IL or missing references)
     //IL_0056: Unknown result type (might be due to invalid IL or missing references)
     //IL_006e: Unknown result type (might be due to invalid IL or missing references)
     //IL_007e: 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_00cb: Unknown result type (might be due to invalid IL or missing references)
     if (m_isOn != isOn)
     {
         m_isOn = isOn;
         float num = isOn ? 1.2f : 1f;
         Color val = isOn ? Color.get_white() : Color.get_gray();
         if (instant)
         {
             m_illustration.get_transform().set_localScale(new Vector3(num, num, 1f));
             m_illustration.set_color(val);
             m_invalidDeck.get_transform().set_localScale(new Vector3(num, num, 1f));
             m_invalidDeck.set_color(val);
         }
         else
         {
             ShortcutExtensions.DOScale(m_illustration.get_transform(), num, 0.15f);
             DOTweenModuleUI.DOColor(m_illustration, val, 0.15f);
             ShortcutExtensions.DOScale(m_invalidDeck.get_transform(), num, 0.15f);
             DOTweenModuleUI.DOColor(m_invalidDeck, val, 0.15f);
         }
     }
 }
        public override void OnConfiguratorUpdate(bool instant)
        {
            //IL_0049: Unknown result type (might be due to invalid IL or missing references)
            //IL_0056: Unknown result type (might be due to invalid IL or missing references)
            base.OnConfiguratorUpdate(instant);
            float num = (m_configurator?.IsWeaponDataAvailable(m_value) ?? true) ? 1f : 0f;
            Color val = default(Color);

            val._002Ector(1f, num, 1f);
            if (instant)
            {
                m_weaponImage.set_color(val);
            }
            else
            {
                DOTweenModuleUI.DOColor(m_weaponImage, val, 0.2f);
            }
        }
Exemple #3
0
        private void UpdateTimerState(int secondsRemaining)
        {
            //IL_00b4: 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)
            //IL_011e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0140: Unknown result type (might be due to invalid IL or missing references)
            if (m_timerTextAnimator == null)
            {
                return;
            }
            TimerState timerState = TimerState.Normal;

            if (secondsRemaining < 0 || secondsRemaining > 15)
            {
                timerState = TimerState.Normal;
            }
            else if (secondsRemaining > 5 && secondsRemaining <= 15)
            {
                timerState = TimerState.Warning;
            }
            else if (secondsRemaining <= 5 && secondsRemaining >= 0)
            {
                timerState = TimerState.Alert;
            }
            if (timerState != m_currentTimerState)
            {
                Tween timerColorTween = m_timerColorTween;
                if (timerColorTween != null)
                {
                    TweenExtensions.Kill(timerColorTween, false);
                }
                m_timerColorTween   = null;
                m_currentTimerState = timerState;
                switch (timerState)
                {
                case TimerState.Normal:
                    m_timerTextAnimator.SetTrigger(s_normalHash);
                    break;

                case TimerState.Warning:
                {
                    m_timerTextAnimator.SetTrigger(s_warningHash);
                    Sequence val = DOTween.Sequence();
                    TweenSettingsExtensions.Insert(val, 0f, DOTweenModuleUI.DOColor(m_timeFilling, m_warningColor.Evaluate(1f), 0.5f));
                    TweenSettingsExtensions.Insert(val, 0f, m_textTurnTime.DOColor(m_warningColor.Evaluate(1f), 0.5f));
                    m_timerColorTween = val;
                    break;
                }

                case TimerState.Alert:
                    m_timerTextAnimator.SetTrigger(s_alertHash);
                    m_textTurnTime.DOColor(m_warningColor.Evaluate(0f), 0.5f);
                    m_timerColorTween = TweenSettingsExtensions.SetLoops <Tweener>(DOTweenModuleUI.DOColor(m_timeFilling, m_warningColor.Evaluate(0f), 0.5f), -1, 1);
                    m_onEndOfTurnBeginAlert.Invoke();
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
        }
Exemple #4
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_00b3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00be: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f6: Unknown result type (might be due to invalid IL or missing references)
            //IL_0101: Unknown result type (might be due to invalid IL or missing references)
            //IL_011c: Unknown result type (might be due to invalid IL or missing references)
            //IL_013e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0159: 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 !", 27, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\UI\\ZaapGameMode\\GameModeButton.cs");
                return;
            }
            GameModeButtonState gameModeButtonState = m_style.disable;

            switch ((int)state)
            {
            case 0:
                gameModeButtonState = m_style.normal;
                break;

            case 1:
                gameModeButtonState = m_style.highlight;
                break;

            case 2:
                gameModeButtonState = m_style.pressed;
                break;

            case 3:
                gameModeButtonState = m_style.disable;
                break;
            }
            Sequence tweenSequence = m_tweenSequence;

            if (tweenSequence != null)
            {
                TweenExtensions.Kill(tweenSequence, false);
            }
            if (instant)
            {
                m_scaleDummy.set_localScale(Vector3.get_one() * gameModeButtonState.scale);
                m_image.set_color(gameModeButtonState.imageColor);
            }
            else
            {
                m_tweenSequence = DOTween.Sequence();
                TweenSettingsExtensions.Insert(m_tweenSequence, 0f, TweenSettingsExtensions.SetEase <Tweener>(ShortcutExtensions.DOScale(m_scaleDummy, Vector3.get_one() * gameModeButtonState.scale, m_style.transitionDuration), m_style.ease));
                TweenSettingsExtensions.Insert(m_tweenSequence, 0f, TweenSettingsExtensions.SetEase <Tweener>(DOTweenModuleUI.DOColor(m_image, gameModeButtonState.imageColor, m_style.transitionDuration), m_style.ease));
            }
        }
Exemple #5
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_00c4: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
            //IL_0100: Unknown result type (might be due to invalid IL or missing references)
            //IL_011e: Unknown result type (might be due to invalid IL or missing references)
            //IL_013c: 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)
            //IL_017b: Unknown result type (might be due to invalid IL or missing references)
            //IL_01b0: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ef: Unknown result type (might be due to invalid IL or missing references)
            //IL_022f: Unknown result type (might be due to invalid IL or missing references)
            //IL_026e: Unknown result type (might be due to invalid IL or missing references)
            //IL_02ae: Unknown result type (might be due to invalid IL or missing references)
            //IL_02ed: Unknown result type (might be due to invalid IL or missing references)
            //IL_032c: 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("AnimatedImageButton " + this.get_name() + " doesn't have a style defined !", 84, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\UI\\Components\\AnimatedGraphicButton.cs");
                return;
            }
            AnimatedImageButtonState animatedImageButtonState = m_style.disable;

            switch ((int)state)
            {
            case 0:
                animatedImageButtonState = m_style.normal;
                break;

            case 1:
                animatedImageButtonState = m_style.highlight;
                break;

            case 2:
                animatedImageButtonState = m_style.pressed;
                break;

            case 3:
                animatedImageButtonState = m_style.disable;
                break;
            }
            Sequence tweenSequence = m_tweenSequence;

            if (tweenSequence != null)
            {
                TweenExtensions.Kill(tweenSequence, false);
            }
            if (instant)
            {
                if (Object.op_Implicit(m_image))
                {
                    m_image.set_color(animatedImageButtonState.imageColor);
                }
                if (Object.op_Implicit(m_imageRectTransform))
                {
                    m_imageRectTransform.set_sizeDelta(animatedImageButtonState.imageSizeDelta);
                }
                if (Object.op_Implicit(m_background))
                {
                    m_background.set_color(animatedImageButtonState.backgroundColor);
                }
                if (Object.op_Implicit(m_backgroundRectTransform))
                {
                    m_backgroundRectTransform.set_sizeDelta(animatedImageButtonState.backgroundSizeDelta);
                }
                if (Object.op_Implicit(m_border))
                {
                    m_border.set_color(animatedImageButtonState.borderColor);
                }
                if (Object.op_Implicit(m_outline))
                {
                    m_outline.set_color(animatedImageButtonState.outlineColor);
                }
                if (Object.op_Implicit(m_outlineRectTransform))
                {
                    m_outlineRectTransform.set_sizeDelta(animatedImageButtonState.outlineSizeDelta);
                }
                return;
            }
            m_tweenSequence = DOTween.Sequence();
            if (Object.op_Implicit(m_image))
            {
                TweenSettingsExtensions.Insert(m_tweenSequence, 0f, DOTweenModuleUI.DOColor(m_image, animatedImageButtonState.imageColor, m_style.baseButtonStyle.transitionDuration));
            }
            if (Object.op_Implicit(m_imageRectTransform))
            {
                TweenSettingsExtensions.Insert(m_tweenSequence, 0f, DOTweenModuleUI.DOSizeDelta(m_imageRectTransform, animatedImageButtonState.imageSizeDelta, m_style.baseButtonStyle.transitionDuration, false));
            }
            if (Object.op_Implicit(m_background))
            {
                TweenSettingsExtensions.Insert(m_tweenSequence, 0f, DOTweenModuleUI.DOBlendableColor(m_background, animatedImageButtonState.backgroundColor, m_style.baseButtonStyle.transitionDuration));
            }
            if (Object.op_Implicit(m_backgroundRectTransform))
            {
                TweenSettingsExtensions.Insert(m_tweenSequence, 0f, DOTweenModuleUI.DOSizeDelta(m_backgroundRectTransform, animatedImageButtonState.backgroundSizeDelta, m_style.baseButtonStyle.transitionDuration, false));
            }
            if (Object.op_Implicit(m_border))
            {
                TweenSettingsExtensions.Insert(m_tweenSequence, 0f, DOTweenModuleUI.DOBlendableColor(m_border, animatedImageButtonState.borderColor, m_style.baseButtonStyle.transitionDuration));
            }
            if (Object.op_Implicit(m_outline))
            {
                TweenSettingsExtensions.Insert(m_tweenSequence, 0f, DOTweenModuleUI.DOBlendableColor(m_outline, animatedImageButtonState.outlineColor, m_style.baseButtonStyle.transitionDuration));
            }
            if (Object.op_Implicit(m_outlineRectTransform))
            {
                TweenSettingsExtensions.Insert(m_tweenSequence, 0f, DOTweenModuleUI.DOSizeDelta(m_outlineRectTransform, animatedImageButtonState.outlineSizeDelta, m_style.baseButtonStyle.transitionDuration, false));
            }
        }
Exemple #6
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);
                }
            }
        }
 private void Hide()
 {
     //DOTweenModuleUI.DOColor(containerImg, colorHide, 0.5f);
     DOTweenModuleUI.DOColor(roundText, colorHide, 1f);
 }
 private void Show()
 {
     //DOTweenModuleUI.DOColor(containerImg, colorShow, 1.5f);
     DOTweenModuleUI.DOColor(roundText, colorShow, 2.5f);
 }
Exemple #9
0
        public static void ShowPopup(this scnEditor editor, bool show, scnEditor.PopupType popupType, string text = "Example Text", float y = 450f,
                                     float alpha = 0.5f, bool skipAnim = false)
        {
            if (editor.get <bool>("popupIsAnimating"))
            {
                return;
            }
            editor.set("showingPopup", show);
            if (show)
            {
                foreach (Component component in editor.popupWindow.transform)
                {
                    component.gameObject.SetActive(false);
                }
                switch (popupType)
                {
                case scnEditor.PopupType.SaveBeforeSongImport:
                case scnEditor.PopupType.SaveBeforeImageImport:
                case scnEditor.PopupType.SaveBeforeVideoImport:
                case scnEditor.PopupType.SaveBeforeLevelExport:
                    editor.savePopupContainer.SetActive(true);
                    editor.savePopupText.text = text;
                    break;

                case scnEditor.PopupType.ExportLevel:
                    editor.publishWindow.windowContainer.SetActive(true);
                    editor.publishWindow.Init();
                    editor.invoke <object>("ShowEventPicker", new object[] { false });
                    editor.settingsPanel.ShowInspector(false);
                    editor.levelEventsPanel.ShowInspector(false);
                    break;

                case scnEditor.PopupType.MissingExportParams:
                    editor.paramsPopupContainer.SetActive(true);
                    string str2 = text;
                    //editor.paramsPopupText.text =
                    //    str2.Replace("[artist]", "<b>" + editor.levelData.artist + "</b>");
                    break;

                case scnEditor.PopupType.OpenURL:
                    editor.urlPopupContainer.SetActive(true);
                    break;

                case scnEditor.PopupType.CopyrightWarning:
                    editor.invoke <object>("ShowEventPicker", new object[] { false });
                    editor.settingsPanel.ShowInspector(false);
                    editor.levelEventsPanel.ShowInspector(false);
                    editor.copyrightPopupContainer.SetActive(true);
                    editor.copyrightText.text = text;
                    break;

                case scnEditor.PopupType.OggEncode:
                    editor.oggPopupContainer.SetActive(true);
                    editor.popupOggCancel.interactable  = true;
                    editor.popupOggConvert.interactable = true;
                    editor.oggConversionBar.gameObject.SetActive(false);
                    editor.oggConversionBarText.text = text;
                    break;

                case scnEditor.PopupType.ConversionSuccesful:
                    editor.okPopupContainer.SetActive(true);
                    editor.okPopupText.text = text;
                    break;

                case scnEditor.PopupType.ConversionError:
                    editor.okPopupContainer.SetActive(true);
                    editor.okPopupText.text = text;
                    break;

                case scnEditor.PopupType.UnsavedChanges:
                    editor.unsavedChangesPopupContainer.SetActive(true);
                    break;
                }
            }

            editor.popupPanel.SetActive(true);
            Image         component1 = editor.popupPanel.GetComponent <Image>();
            RectTransform component2 = editor.popupWindow.GetComponent <RectTransform>();
            float         duration   = skipAnim ? 0.0f : 0.5f;

            alpha = show ? alpha : 0.0f;
            float num      = 20f;
            float endValue = show ? num : y;

            component2.DOKill();
            component1.DOKill();
            if (show)
            {
                component2.SetAnchorPosY(y);
                component1.color = Color.black.WithAlpha(0.0f);
            }

            DOTweenModuleUI.DOColor(component1, Color.black.WithAlpha(alpha), duration / 2f)
            .SetUpdate(true)
            .SetEase(Ease.Linear);
            editor.set("popupIsAnimating", true);
            component2.DOAnchorPosY(endValue, duration).SetUpdate(true)
            .SetEase(show ? Ease.OutBack : Ease.InBack)
            .OnComplete(() =>
            {
                editor.set("popupIsAnimating", false);
                if (show)
                {
                    return;
                }
                editor.popupPanel.SetActive(false);
            });
            editor.ShowFileActionsPanel(false);
            editor.ShowShortcutsPanel(false);
        }