public void SetGashaInfo(GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo)
        {
            this.gashaInfo = gashaInfo;
            this.gashaDetailBanner.Create();
            this.gashaDetailBanner.AllBuild(gashaInfo.subImagePath);
            this.gashaDetailBanner.selectParts.SetActive(false);
            switch (gashaInfo.priceType.GetCostAssetsCategory())
            {
            case MasterDataMng.AssetCategory.DIGI_STONE:
                this.titleParts.SetTitle(StringMaster.GetString("GashaTitleRare"));
                this.shopButton.SetActive(true);
                this.detailButton.SetActive(true);
                this.cautionButton.SetActive(true);
                this.SetCautionButtonText(gashaInfo.GetPrizeAssetsCategory());
                return;

            case MasterDataMng.AssetCategory.LINK_POINT:
                this.titleParts.SetTitle(StringMaster.GetString("GashaTitleLink"));
                this.shopButton.SetActive(false);
                this.detailButton.SetActive(false);
                this.cautionButton.SetActive(false);
                return;
            }
            this.titleParts.SetTitle(StringMaster.GetString("CaptureTitle"));
            this.shopButton.SetActive(false);
            this.detailButton.SetActive(true);
            this.cautionButton.SetActive(true);
            this.SetCautionButtonText(gashaInfo.GetPrizeAssetsCategory());
        }
        public static bool ExistLimitPlayCount(this GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo)
        {
            int num = 0;

            int.TryParse(gashaInfo.totalPlayLimitCount, out num);
            return(0 < num);
        }
Пример #3
0
        public static ExecGashaBase CreateExecGasha(GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo, bool isTutorial)
        {
            ExecGashaBase execGashaBase = null;

            MasterDataMng.AssetCategory prizeAssetsCategory = gashaInfo.GetPrizeAssetsCategory();
            if (prizeAssetsCategory != MasterDataMng.AssetCategory.MONSTER)
            {
                if (prizeAssetsCategory != MasterDataMng.AssetCategory.CHIP)
                {
                    if (prizeAssetsCategory == MasterDataMng.AssetCategory.DUNGEON_TICKET)
                    {
                        execGashaBase = new ExecGashaTicket();
                    }
                }
                else
                {
                    execGashaBase = new ExecGashaChip();
                }
            }
            else if (isTutorial && FactoryExecGasha.IsOnlyCutScene(gashaInfo.priceType.GetCostAssetsCategory()))
            {
                execGashaBase = new ExecGashaMonsterCutSceneOnly();
            }
            else
            {
                execGashaBase = new ExecGashaMonster();
            }
            Debug.Assert(null != execGashaBase, "ガシャ実行機能の作成に失敗.");
            execGashaBase.SetGashaInfo(gashaInfo);
            return(execGashaBase);
        }
        public static void UpdatePlayCount(this GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo, int playCount)
        {
            if ("0" != gashaInfo.totalPlayLimitCount)
            {
                gashaInfo.totalPlayCount = (int.Parse(gashaInfo.totalPlayCount) + playCount).ToString();
            }
            string b = playCount.ToString();

            for (int i = 0; i < gashaInfo.details.Length; i++)
            {
                if (gashaInfo.details[i].count == b)
                {
                    if (gashaInfo.details[i].isFirst == 1)
                    {
                        gashaInfo.details[i].isFirst      = 0;
                        gashaInfo.details[i].isTodayFirst = 0;
                    }
                    else if (gashaInfo.details[i].isTodayFirst == 1)
                    {
                        gashaInfo.details[i].isTodayFirst = 0;
                    }
                    break;
                }
            }
        }
 public static void GetUrlPickUpPage(this GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo, out string title, out string url)
 {
     MasterDataMng.AssetCategory prizeAssetsCategory = gashaInfo.GetPrizeAssetsCategory();
     if (prizeAssetsCategory != MasterDataMng.AssetCategory.CHIP)
     {
         if (prizeAssetsCategory != MasterDataMng.AssetCategory.DUNGEON_TICKET)
         {
             if (prizeAssetsCategory != MasterDataMng.AssetCategory.MONSTER)
             {
                 title = string.Empty;
                 url   = string.Empty;
             }
             else
             {
                 title = StringMaster.GetString("GashaLineupCaution");
                 url   = WebAddress.EXT_ADR_GASHA_INCIDENCE + gashaInfo.gachaId;
             }
         }
         else
         {
             title = StringMaster.GetString("TicketGashaLineupCaution");
             url   = WebAddress.EXT_ADR_TICKET_GASHA_INCIDENCE + gashaInfo.gachaId;
         }
     }
     else
     {
         title = StringMaster.GetString("ChipGashaLineupCaution");
         url   = WebAddress.EXT_ADR_CHIP_GASHA_INCIDENCE + gashaInfo.gachaId;
     }
 }
Пример #6
0
 public GameWebAPI.RespDataGA_GetGachaInfo.Result GetInfo(int index)
 {
     GameWebAPI.RespDataGA_GetGachaInfo.Result result = null;
     if (index < this.gashaInfoList.Count)
     {
         result = this.gashaInfoList[index];
     }
     return(result);
 }
Пример #7
0
 private void SetGashaDetailed(int selectGashaIndex)
 {
     GameWebAPI.RespDataGA_GetGachaInfo.Result info = this.gashaInfoManager.GetInfo(selectGashaIndex);
     if (info != null)
     {
         this.startButton.SetGashaInfo(info, this.isTutorial);
         this.startButton.SetPlayButton();
         this.userInventory.SetGashaPriceType(info.priceType);
     }
 }
Пример #8
0
 private void ChangeSelection(int selectGashaIndex)
 {
     this.selectGashaButtonIndex = selectGashaIndex;
     GameWebAPI.RespDataGA_GetGachaInfo.Result info = this.gashaInfoManager.GetInfo(selectGashaIndex);
     if (info != null)
     {
         this.mainInfomation.SetGashaInfo(info);
         this.SetGashaDetailed(selectGashaIndex);
         LeadCapture.Instance.SaveCaptureUpdate(this.gashaInfoManager.GetEndTimeList());
     }
 }
        public static string GetRemainingPlayCountText(this GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo, int playCount)
        {
            string result = string.Empty;

            if (gashaInfo.ExistLimitPlayCount())
            {
                int remainingPlayCount = gashaInfo.GetRemainingPlayCount();
                result = string.Format(StringMaster.GetString("RemainingPlayCount"), remainingPlayCount / playCount);
            }
            return(result);
        }
        public static int GetRemainingPlayCount(this GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo)
        {
            int num = 0;

            int.TryParse(gashaInfo.totalPlayLimitCount, out num);
            int num2 = 0;

            int.TryParse(gashaInfo.totalPlayCount, out num2);
            int num3 = num - num2;

            return((0 <= num3) ? num3 : 0);
        }
        public static MasterDataMng.AssetCategory GetPrizeAssetsCategory(this GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo)
        {
            MasterDataMng.AssetCategory assetCategory = MasterDataMng.AssetCategory.NO_DATA_ID;
            int num = 0;

            if (int.TryParse(gashaInfo.prize, out num))
            {
                assetCategory = (MasterDataMng.AssetCategory)num;
            }
            Debug.Assert(MasterDataMng.AssetCategory.NO_DATA_ID != assetCategory, "ガシャ景品のアセットカテゴリーの取得失敗.");
            return(assetCategory);
        }
        public void SetGashaInfo(GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo, bool isTutorial)
        {
            this.gashaInfo  = gashaInfo;
            this.isTutorial = isTutorial;
            MasterDataMng.AssetCategory costAssetsCategory = gashaInfo.priceType.GetCostAssetsCategory();
            string costAssetsValue = gashaInfo.priceType.GetCostAssetsValue();

            for (int i = 0; i < gashaInfo.details.Length; i++)
            {
                this.buttonList[i].SetAssets(costAssetsCategory, costAssetsValue, gashaInfo.details[i].GetPrice());
                this.buttonList[i].SetPopText(gashaInfo, gashaInfo.details[i], isTutorial);
            }
        }
 public void AllBuild(List <GameWebAPI.RespDataGA_GetGachaInfo.Result> gashaInfoList, Texture[] textureList, Action <int> pushedAction, int selectedButtonIndex, bool isTutorial)
 {
     this.animIndexBK = -1;
     base.InitBuild();
     this.partsCount = gashaInfoList.Count;
     if (null != base.selectCollider)
     {
         this.actionPushedButton = pushedAction;
         GUISelectPanelBSPartsUD.PanelBuildData panelBuildData = base.CalcBuildData(1, this.partsCount, 1f, 1f);
         float num = panelBuildData.startY;
         for (int i = 0; i < gashaInfoList.Count; i++)
         {
             GameWebAPI.RespDataGA_GetGachaInfo.Result result = gashaInfoList[i];
             GameObject            gameObject = base.AddBuildPart();
             GUIListPartsGashaMain component  = gameObject.GetComponent <GUIListPartsGashaMain>();
             if (null != component)
             {
                 component.SetOriginalPos(new Vector3(0f, num, -5f));
                 component.GashaInfo = result;
                 component.ShowGUI(textureList[i]);
                 component.selectPanelA            = this;
                 component.AvoidDisableAllCollider = true;
                 component.SetPushedAction(new Action <int>(this.OnPushedGashaButton));
                 if (isTutorial && result.priceType.GetCostAssetsCategory() == MasterDataMng.AssetCategory.LINK_POINT)
                 {
                     component.gameObject.AddComponent <TutorialEmphasizeUI>();
                     TutorialEmphasizeUI component2 = component.gameObject.GetComponent <TutorialEmphasizeUI>();
                     component2.UiName = TutorialEmphasizeUI.UiNameType.TAB2_RIGHT;
                 }
                 if (i == selectedButtonIndex)
                 {
                     component.SetBGColor(true);
                     component.SetFadeInEndCallBack(delegate
                     {
                         this.SetCellAnim(selectedButtonIndex);
                     });
                 }
             }
             num -= panelBuildData.pitchH;
         }
         base.height = panelBuildData.lenH;
         base.InitMinMaxLocation(selectedButtonIndex, 0f);
         if (!this.partObjs[selectedButtonIndex].IsFadeDo())
         {
             this.partObjs[selectedButtonIndex].gameObject.SetActive(false);
             this.SetCellAnim(selectedButtonIndex);
         }
     }
 }
Пример #14
0
    private IEnumerator DownloadTexture_(List <GameWebAPI.RespDataGA_GetGachaInfo.Result> gashaInfoList, Action <Texture[]> action)
    {
        Texture[] textureList = new Texture[gashaInfoList.Count];
        for (int i = 0; i < gashaInfoList.Count; i++)
        {
            GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo = gashaInfoList[i];
            if (gashaInfo != null)
            {
                yield return(AppCoroutine.Start(this.DownloadTex(gashaInfo.mainImagePath), false));

                textureList[i] = this.topTex;
            }
        }
        if (action != null)
        {
            action(textureList);
        }
        yield break;
    }
Пример #15
0
 public void SetPopText(GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo, GameWebAPI.RespDataGA_GetGachaInfo.Detail gashaDetail, bool isTutorial)
 {
     this.playCount = gashaDetail.count;
     if (!isTutorial)
     {
         string remainingPlayCountText = string.Empty;
         if (gashaInfo.ExistLimitPlayCount())
         {
             int num = 0;
             if (int.TryParse(gashaDetail.count, out num))
             {
                 remainingPlayCountText = gashaInfo.GetRemainingPlayCountText(num);
             }
         }
         this.SetPopText(remainingPlayCountText, gashaDetail.GetCampaignText());
     }
     else
     {
         this.popObject.SetActive(false);
         this.popLabel.text = string.Empty;
     }
 }
Пример #16
0
        private int SortGashaInfo(GameWebAPI.RespDataGA_GetGachaInfo.Result x, GameWebAPI.RespDataGA_GetGachaInfo.Result y)
        {
            int num  = int.Parse(x.dispNum);
            int num2 = int.Parse(y.dispNum);

            if (num > num2)
            {
                return(-1);
            }
            if (num < num2)
            {
                return(1);
            }
            string startTime  = x.startTime;
            string startTime2 = y.startTime;

            num  = startTime.CompareTo(startTime2);
            num2 = startTime2.CompareTo(startTime);
            if (num > num2)
            {
                return(-1);
            }
            if (num < num2)
            {
                return(1);
            }
            num  = int.Parse(x.gachaId);
            num2 = int.Parse(y.gachaId);
            if (num > num2)
            {
                return(-1);
            }
            if (num < num2)
            {
                return(1);
            }
            return(0);
        }
Пример #17
0
 public void SetGashaInfo(GameWebAPI.RespDataGA_GetGachaInfo.Result gashaInfo)
 {
     this.gashaInfo = gashaInfo;
 }