Пример #1
0
 private void OnDecisionButton()
 {
     CMD_ChipSortModal.data.Copy(this.tempData);
     CMD_ChipSortModal.SaveSetting();
     base.SetForceReturnValue(1);
     this.ClosePanel(true);
 }
    private void OnSortButton()
    {
        Action <int> callback = delegate(int result)
        {
            if (result > 0)
            {
                this.sortNameLabel.text = CMD_ChipSortModal.GetSortName();
                this.userChipList       = this.ConvertChipList(ChipDataMng.userChipData);
                this.chipList.ReAllBuild(this.userChipList, false, false);
                this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
                this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
                this.messageLabel.gameObject.SetActive(this.userChipList.Length == 0);
                if (this.viewModeType == CMD_ChipAdministration.ViewModeType.Sale)
                {
                    foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList in this.saleUserChipList)
                    {
                        this.chipList.SetSelectColor(userChipList.userChipId, true);
                    }
                    foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList2 in this.userChipList)
                    {
                        if (userChipList2.userMonsterId > 0)
                        {
                            this.chipList.SetSelectColor(userChipList2.userChipId, true);
                        }
                    }
                    for (int j = 0; j < this.saleUserChipList.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>(); j++)
                    {
                        this.chipList.SetSelectMessage(this.saleUserChipList[j].userChipId, (j + 1).ToString());
                    }
                }
            }
        };

        CMD_ChipSortModal.Create(callback);
    }
Пример #3
0
    public void OnResetButton()
    {
        Action action = delegate()
        {
            IEnumerator enumerator = Enum.GetValues(typeof(CMD_ChipSortModal.RefineType)).GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    object obj = enumerator.Current;
                    this.SetSelectRefine(true, (CMD_ChipSortModal.RefineType)obj);
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
            CMD_ChipSortModal.sortedUserChipList = CMD_ChipSortModal.GetRefineSortList(CMD_ChipSortModal.baseUserChipList, this.tempData);
            this.tempData.isAllRank = true;
            this.refineInfo.allRank.SetSelect(this.tempData.isAllRank);
            this.tempData.isAllTribe = true;
            this.refineInfo.allTribe.SetSelect(this.tempData.isAllTribe);
            this.EnableResetButton(false);
            this.UpdateCurrentSortCountLabel();
        };

        AppCoroutine.Start(this.Load(action), false);
    }
    public override void Show(Action <int> f, float sizeX, float sizeY, float aT)
    {
        GUICollider.DisableAllCollider("CMD_ChipList");
        RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
        base.HideDLG();
        this.userChipList = this.ConvertChipList(ChipDataMng.userChipData);
        this.chipList     = new ChipList(this.goEFC_FOOTER, 7, new Vector2(960f, 450f), this.userChipList, false, true);
        this.chipList.SetPosition(new Vector3(-110f, -70f, 0f));
        this.chipList.SetScrollBarPosX(450f);
        this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
        this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
        this.chipList.AddWidgetDepth(base.gameObject.GetComponent <UIWidget>().depth);
        this.chipList.SetTouchAreaWidth(875f);
        this.messageLabel.gameObject.SetActive(this.userChipList.Length == 0);
        int num = 0;

        if (ChipDataMng.userChipData != null && ChipDataMng.userChipData.userChipList != null)
        {
            num = ChipDataMng.userChipData.userChipList.Length;
        }
        this.listCountLabel.text          = string.Format(StringMaster.GetString("SystemFraction"), num, DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.chipLimitMax);
        this.saleClusterMessageLabel.text = "0";
        this.sortNameLabel.text           = CMD_ChipSortModal.GetSortName();
        this.UpdateCluster();
        this.ChangeViewMode(CMD_ChipAdministration.ViewModeType.List);
        base.ShowDLG();
        base.SetTutorialAnyTime("anytime_second_tutorial_chip_list");
        base.Show(f, sizeX, sizeY, aT);
        RestrictionInput.EndLoad();
    }
Пример #5
0
    public override void Show(Action <int> closeEvent, float sizeX, float sizeY, float showAnimationTime)
    {
        GUICollider.DisableAllCollider("CMD_ChipReinforced");
        RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
        base.HideDLG();
        GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] array = this.ConvertChipList(ChipDataMng.userChipData);
        this.chipList = new ChipList(this.goEFC_FOOTER, 8, new Vector2(960f, 450f), array, false, true);
        this.chipList.SetPosition(new Vector3(-40f, -70f, 0f));
        this.chipList.SetScrollBarPosX(520f);
        this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
        this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
        this.chipList.AddWidgetDepth(base.gameObject.GetComponent <UIWidget>().depth);
        base.PartsTitle.SetTitle(StringMaster.GetString("ChipReinforcement-01"));
        this.sortButtonLabel.text      = StringMaster.GetString("SystemSortButton");
        this.sortNameLabel.text        = CMD_ChipSortModal.GetSortName();
        this.sortButton.CallBackClass  = base.gameObject;
        this.sortButton.MethodToInvoke = "OnSortButton";
        this.messageLabel.gameObject.SetActive(array.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>() == 0);
        this.messageLabel.text = StringMaster.GetString("ChipAdministration-01");
        int num = 0;

        if (ChipDataMng.userChipData != null && ChipDataMng.userChipData.userChipList != null)
        {
            num = ChipDataMng.userChipData.userChipList.Length;
        }
        this.listCountLabel.text = string.Format(StringMaster.GetString("SystemFraction"), num, DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.chipLimitMax);
        base.ShowDLG();
        base.SetTutorialAnyTime("anytime_second_tutorial_chip_reinforcement");
        base.Show(closeEvent, sizeX, sizeY, showAnimationTime);
        RestrictionInput.EndLoad();
    }
    private GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] ConvertChipList(GameWebAPI.RespDataCS_ChipListLogic chipListLogic)
    {
        List <GameWebAPI.RespDataCS_ChipListLogic.UserChipList> list = new List <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>();

        if (chipListLogic != null && chipListLogic.userChipList != null)
        {
            list.AddRange(chipListLogic.userChipList);
            CMD_ChipSortModal.UpdateSortedUserChipList(list.ToArray());
            return(CMD_ChipSortModal.sortedUserChipList);
        }
        return(list.ToArray());
    }
Пример #7
0
 public override void Show(Action <int> f, float sizeX, float sizeY, float aT)
 {
     RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
     base.HideDLG();
     this.SetupLocalize();
     this.SetupChips(ChipDataMng.userChipData);
     this.SetupChipDetail();
     this.SetupAttackButton();
     this.changeViewContentLabel.text = CMD_ChipSortModal.GetSortName();
     base.ShowDLG();
     base.Show(f, sizeX, sizeY, aT);
     RestrictionInput.EndLoad();
 }
Пример #8
0
    public static void UpdateSortedUserChipList(GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] list)
    {
        List <GameWebAPI.RespDataCS_ChipListLogic.UserChipList> list2 = new List <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>();

        if (list != null)
        {
            for (int i = 0; i < list.Length; i++)
            {
                list2.Add(list[i]);
            }
        }
        CMD_ChipSortModal.baseUserChipList   = list2.ToArray();
        CMD_ChipSortModal.sortedUserChipList = CMD_ChipSortModal.GetRefineSortList(CMD_ChipSortModal.baseUserChipList, CMD_ChipSortModal.data);
    }
Пример #9
0
    private void OnAllTribeButton()
    {
        Action action = delegate()
        {
            this.SetSelectRefine(true, CMD_ChipSortModal.tribeRefineTypes);
            CMD_ChipSortModal.sortedUserChipList = CMD_ChipSortModal.GetRefineSortList(CMD_ChipSortModal.baseUserChipList, this.tempData);
            this.tempData.isAllTribe             = true;
            this.refineInfo.allTribe.SetSelect(this.tempData.isAllTribe);
            bool value = this.CheckEnableResetButton();
            this.EnableResetButton(value);
            this.UpdateCurrentSortCountLabel();
        };

        AppCoroutine.Start(this.Load(action), false);
    }
Пример #10
0
    private void OnRefineContentButton(CMD_ChipSortModal.RefineType refineType)
    {
        Action action = delegate()
        {
            this.SetSelectRefine((this.tempData.refineTypeList & (int)refineType) <= 0, refineType);
            CMD_ChipSortModal.sortedUserChipList = CMD_ChipSortModal.GetRefineSortList(CMD_ChipSortModal.baseUserChipList, this.tempData);
            bool value = this.CheckEnableResetButton();
            this.EnableResetButton(value);
            this.tempData.isAllRank = this.CheckAllButton(CMD_ChipSortModal.rankRefineTypes);
            this.refineInfo.allRank.SetSelect(this.tempData.isAllRank);
            this.tempData.isAllTribe = this.CheckAllButton(CMD_ChipSortModal.tribeRefineTypes);
            this.refineInfo.allTribe.SetSelect(this.tempData.isAllTribe);
            this.UpdateCurrentSortCountLabel();
        };

        AppCoroutine.Start(this.Load(action), false);
    }
Пример #11
0
    private void OnSortButton()
    {
        Action <int> callback = delegate(int result)
        {
            global::Debug.Log("result " + result);
            if (result > 0)
            {
                this.sortNameLabel.text = CMD_ChipSortModal.GetSortName();
                GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] array = this.ConvertChipList(ChipDataMng.userChipData);
                this.chipList.ReAllBuild(array, false, false);
                this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
                this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
                this.messageLabel.gameObject.SetActive(array.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>() == 0);
            }
        };

        CMD_ChipSortModal.Create(callback);
    }
Пример #12
0
    private GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] ConvertChipList(GameWebAPI.RespDataCS_ChipListLogic chipListLogic)
    {
        List <GameWebAPI.RespDataCS_ChipListLogic.UserChipList> list = new List <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>();

        if (chipListLogic != null && chipListLogic.userChipList != null)
        {
            foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList2 in chipListLogic.userChipList)
            {
                GameWebAPI.RespDataMA_ChipM.Chip chipEnhancedData = ChipDataMng.GetChipEnhancedData(userChipList2.chipId.ToString());
                if (chipEnhancedData != null)
                {
                    list.Add(userChipList2);
                }
            }
            CMD_ChipSortModal.UpdateSortedUserChipList(list.ToArray());
            return(CMD_ChipSortModal.sortedUserChipList);
        }
        return(list.ToArray());
    }
Пример #13
0
 public static void LoadSetting()
 {
     if (PlayerPrefs.HasKey("ChipSortData"))
     {
         string @string = PlayerPrefs.GetString("ChipSortData");
         try
         {
             CMD_ChipSortModal.data.Copy(JsonUtility.FromJson <CMD_ChipSortModal.Data>(@string));
         }
         catch
         {
             CMD_ChipSortModal.data.Copy(new CMD_ChipSortModal.Data());
             CMD_ChipSortModal.SaveSetting();
         }
     }
     else
     {
         CMD_ChipSortModal.data.Copy(new CMD_ChipSortModal.Data());
     }
 }
Пример #14
0
 private void SetupSortUI()
 {
     this.sortInfo.orderByAsc.label.text            = StringMaster.GetString("ChipSortModal-05");
     this.sortInfo.orderByAsc.button.CallBackClass  = base.gameObject;
     this.sortInfo.orderByAsc.button.MethodToInvoke = "OnOrderByAsc";
     this.sortInfo.orderByAsc.SetSelect(this.tempData.isOrderByAsc);
     this.sortInfo.orderByDesc.label.text            = StringMaster.GetString("ChipSortModal-06");
     this.sortInfo.orderByDesc.button.CallBackClass  = base.gameObject;
     this.sortInfo.orderByDesc.button.MethodToInvoke = "OnOrderByDesc";
     this.sortInfo.orderByDesc.SetSelect(!this.tempData.isOrderByAsc);
     CMD_ChipSortModal.SortButtonInfo[] sortContents = this.sortInfo.sortContents;
     for (int i = 0; i < sortContents.Length; i++)
     {
         CMD_ChipSortModal.SortButtonInfo sortButtonInfo = sortContents[i];
         CMD_ChipSortModal.SortType       sortType       = sortButtonInfo.sortType;
         sortButtonInfo.label.text           = CMD_ChipSortModal.GetSortName(sortType);
         sortButtonInfo.button.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
         {
             this.OnSortContentButton(sortType);
         };
         sortButtonInfo.SetSelect(sortType == this.tempData.sortType);
     }
     this.currentSortNameLabel.text = string.Format(StringMaster.GetString("Sort-01"), CMD_ChipSortModal.GetSortName(this.tempData.sortType));
 }
Пример #15
0
    private IEnumerator StartEvent()
    {
        RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_OFF);
        ClassSingleton <MonsterUserDataMng> .Instance.Initialize();

        GUIMonsterIcon.InitMonsterGO(Singleton <GUIMain> .Instance.transform);
        ClassSingleton <GUIMonsterIconList> .Instance.Initialize();

        yield return(base.StartCoroutine(AssetBundleMng.Instance().WaitCacheReady()));

        yield return(base.StartCoroutine(StoreInit.Instance().InitStore()));

        this.googlePlay.Bootup();
        yield return(base.StartCoroutine(this.AuthLogin()));

        yield return(base.StartCoroutine(APIUtil.Instance().StartGameLogin()));

        if (DataMng.Instance().RespDataCM_Login == null)
        {
            SoundMng.Instance().PlayBGM("BGMInternal/bgm_103/sound", 0.3f, null);
            this.screenCollider.playOkSE = false;
            this.switchTitleImage(GUIScreenTitle.TitleStete.returnVal);
            RestrictionInput.EndLoad();
            GUIFadeControll.ActionRestart();
            yield break;
        }
        this.titleState = (GUIScreenTitle.TitleStete)DataMng.Instance().RespDataCM_Login.state;
        this.switchTitleImage(this.titleState);
        GUIFadeControll.ActionRestart();
        string responseContactCode = PlayerPrefs.GetString("InquiryCode", string.Empty);

        if (string.IsNullOrEmpty(responseContactCode))
        {
            GameWebAPI.RequestCM_InquiryCodeRequest requestCM_InquiryCodeRequest = new GameWebAPI.RequestCM_InquiryCodeRequest();
            requestCM_InquiryCodeRequest.OnReceived = delegate(GameWebAPI.InquiryCodeRequest response)
            {
                PlayerPrefs.SetString("InquiryCode", response.inquiryCode);
            };
            GameWebAPI.RequestCM_InquiryCodeRequest request = requestCM_InquiryCodeRequest;
            yield return(base.StartCoroutine(request.Run(null, null, null)));
        }
        this.userID.gameObject.SetActive(true);
        this.userCode.gameObject.SetActive(true);
        this.appVersion.gameObject.SetActive(true);
        this.buildNumLabel.gameObject.SetActive(true);
        this.NpVersion.gameObject.SetActive(true);
        this.userCode.text   = string.Format(StringMaster.GetString("TitleUserCode"), DataMng.Instance().RespDataCM_Login.playerInfo.userCode);
        this.appVersion.text = string.Format(StringMaster.GetString("TitleAppVersion"), VersionManager.version);
        GameWebAPI.RespDataCM_Login.TutorialStatus tutorialStatus = DataMng.Instance().RespDataCM_Login.tutorialStatus;
        if ("0" == tutorialStatus.endFlg && "0" == tutorialStatus.statusId)
        {
            this.cacheClearButtonCollider.enabled  = false;
            this.cacheClearButtonLabel.color       = Color.gray;
            this.cacheClearButtonLabel.effectColor = Color.gray;
            this.cacheClearButtonSprite.spriteName = "Common02_Btn_BaseG";
        }
        yield return(this.backup.CheckClearMissionForGoogle());

        if (GUICollider.IsAllColliderDisable())
        {
            GUICollider.EnableAllCollider(string.Empty);
        }
        RestrictionInput.EndLoad();
        if ("0" != tutorialStatus.endFlg)
        {
            CMD_BaseSelect.LoadSetting();
            CMD_ChipSortModal.LoadSetting();
        }
        yield break;
    }
Пример #16
0
 private void OnSortContentButton(CMD_ChipSortModal.SortType sortType)
 {
     this.tempData.sortType = sortType;
     foreach (CMD_ChipSortModal.SortButtonInfo sortButtonInfo in this.sortInfo.sortContents)
     {
         sortButtonInfo.SetSelect(sortButtonInfo.sortType == this.tempData.sortType);
     }
     this.currentSortNameLabel.text = string.Format(StringMaster.GetString("Sort-01"), CMD_ChipSortModal.GetSortName(this.tempData.sortType));
 }
Пример #17
0
 public static string GetSortName()
 {
     return(CMD_ChipSortModal.GetSortName(CMD_ChipSortModal.data.sortType));
 }
Пример #18
0
 private GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] GetDataList(GameWebAPI.RespDataCS_ChipListLogic data)
 {
     GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] list = data.userChipList.ToArray <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>();
     CMD_ChipSortModal.UpdateSortedUserChipList(list);
     return(CMD_ChipSortModal.sortedUserChipList);
 }