Beispiel #1
0
        private void Start()
        {
            isPushMode          = true;
            isTeamColorMode     = false;
            slider_Factor.value = factor;
            text_Factor.text    = $"x{factor:F1}";

            DOTween.Init();

            RefreshUserInfoUI();

            SoundManager.instance.PlayBGM(Global.E_SOUND.BGM_LOBBY);

            FirebaseManager.Get().LogEvent("Login");

            if (UserInfoManager.Get().GetUserInfo().needSeasonReset)
            {
                ShowMessageBox(LocalizationManager.GetLangDesc("Seasonpass_Endseason"),
                               LocalizationManager.GetLangDesc("Seasonpass_Endseason"),
                               seasonEndPopup.Initialize);
            }

            // TDataShopProductList data;
            // if (TableManager.Get().ShopProductList.GetData(pd => pd.isShow == true, out data))
            // {
            //     Debug.Log(data.googleProductId + ", " + data.appleProductId);
            // }

            HideAnotherPanel();

            canvasWidth = ((RectTransform)transform).sizeDelta.x;
            ((RectTransform)arrPanels[0].transform).offsetMin = new Vector2(-canvasWidth * 2,
                                                                            ((RectTransform)arrPanels[0].transform).offsetMin.y);
            ((RectTransform)arrPanels[0].transform).offsetMax = new Vector2(-canvasWidth * 2,
                                                                            ((RectTransform)arrPanels[0].transform).offsetMin.y);
            canvasWidth = ((RectTransform)transform).sizeDelta.x;
            ((RectTransform)arrPanels[1].transform).offsetMin = new Vector2(-canvasWidth,
                                                                            ((RectTransform)arrPanels[1].transform).offsetMin.y);
            ((RectTransform)arrPanels[1].transform).offsetMax = new Vector2(-canvasWidth,
                                                                            ((RectTransform)arrPanels[1].transform).offsetMin.y);
            canvasWidth = ((RectTransform)transform).sizeDelta.x;
            ((RectTransform)arrPanels[3].transform).offsetMin = new Vector2(canvasWidth,
                                                                            ((RectTransform)arrPanels[3].transform).offsetMin.y);
            ((RectTransform)arrPanels[3].transform).offsetMax = new Vector2(canvasWidth,
                                                                            ((RectTransform)arrPanels[3].transform).offsetMin.y);
            canvasWidth = ((RectTransform)transform).sizeDelta.x;
            ((RectTransform)arrPanels[4].transform).offsetMin = new Vector2(canvasWidth * 2,
                                                                            ((RectTransform)arrPanels[4].transform).offsetMin.y);
            ((RectTransform)arrPanels[4].transform).offsetMax = new Vector2(canvasWidth * 2,
                                                                            ((RectTransform)arrPanels[4].transform).offsetMin.y);
            mainPagePosX = new float[] { canvasWidth * 2, canvasWidth, 0, -canvasWidth, -canvasWidth * 2 };
            Click_MainButton(2);

            if (listADReward.Count > 0)
            {
                AddReward(listADReward.ToArray(), btn_PlayBattle.transform.position);

                listADReward.Clear();
            }
        }