Exemplo n.º 1
0
        public override IEnumerator Exec(GameWebAPI.GA_Req_ExecGacha playGashaRequestParam, bool isTutorial)
        {
            GameWebAPI.RespDataGA_ExecChip gashaResult = null;
            GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] userChipList = null;
            GameWebAPI.RequestGA_ChipExec request = new GameWebAPI.RequestGA_ChipExec
            {
                SetSendData = delegate(GameWebAPI.GA_Req_ExecChip param)
                {
                    param.gachaId   = playGashaRequestParam.gachaId;
                    param.playCount = playGashaRequestParam.playCount;
                },
                OnReceived = delegate(GameWebAPI.RespDataGA_ExecChip response)
                {
                    gashaResult  = response;
                    userChipList = this.SetGashaResult(gashaResult, playGashaRequestParam.playCount);
                }
            };
            yield return(AppCoroutine.Start(request.Run(delegate()
            {
                this.SetGashaResultWindow(gashaResult, userChipList);
                this.SetGashaCutScene(gashaResult, playGashaRequestParam.playCount);
            }, delegate(Exception noop)
            {
                RestrictionInput.EndLoad();
                GUIManager.CloseAllCommonDialog(null);
            }, null), false));

            yield break;
        }
Exemplo n.º 2
0
 private void SetGashaResultWindow(GameWebAPI.RespDataGA_ExecChip gashaResult, GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] userChipList)
 {
     CMD_ChipGashaResult.gashaInfo     = this.gashaInfo;
     CMD_ChipGashaResult.UserAssetList = gashaResult.userAssetList;
     CMD_ChipGashaResult.SetUserChipList(userChipList);
     CMD_ChipGashaResult.RewardsData = gashaResult.rewards;
 }
Exemplo n.º 3
0
        private void SetGashaCutScene(GameWebAPI.RespDataGA_ExecChip gashaResult, int playCount)
        {
            string  bgmFileName = (playCount != 1) ? "bgm_205" : "bgm_204";
            UIPanel uipanel     = GUIMain.GetUIPanel();
            CutsceneDataChipGasha cutsceneDataChipGasha = new CutsceneDataChipGasha
            {
                path           = "Cutscenes/AssetBundle/ChipGasha/chip_gacha",
                gashaResult    = gashaResult.userAssetList,
                bgmFileName    = bgmFileName,
                backgroundSize = uipanel.GetWindowSize()
            };

            cutsceneDataChipGasha.endCallback = delegate(RenderTexture renderTexture)
            {
                UITexture txBG = CMD_ChipGashaResult.instance.txBG;
                txBG.mainTexture = renderTexture;
                txBG.width       = renderTexture.width;
                txBG.height      = renderTexture.height;
                CutSceneMain.FadeReqCutSceneEnd();
                SoundMng.Instance().PlayGameBGM("bgm_202");
            };
            Loading.Invisible();
            CutsceneDataBase cutsceneData = cutsceneDataChipGasha;

            if (ExecGashaChip.< > f__mg$cache0 == null)
            {
                ExecGashaChip.< > f__mg$cache0 = new Action(CMD_ChipGashaResult.CreateDialog);
            }
            CutSceneMain.FadeReqCutScene(cutsceneData, ExecGashaChip.< > f__mg$cache0, null, new Action <int>(this.OnShowedGashaResultDialog), 0.5f, 0.5f);
        }
Exemplo n.º 4
0
 private GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] SetGashaResult(GameWebAPI.RespDataGA_ExecChip gashaResult, int playCount)
 {
     UserHomeInfo.dirtyMyPage = true;
     GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] array = new GameWebAPI.RespDataCS_ChipListLogic.UserChipList[gashaResult.userAssetList.Length];
     for (int i = 0; i < array.Length; i++)
     {
         int num  = 0;
         int num2 = 0;
         if (int.TryParse(gashaResult.userAssetList[i].assetValue, out num) && int.TryParse(gashaResult.userAssetList[i].userAssetId, out num2))
         {
             array[i] = new GameWebAPI.RespDataCS_ChipListLogic.UserChipList
             {
                 chipId        = num,
                 userChipId    = num2,
                 userMonsterId = 0
             };
         }
         global::Debug.Assert(null != array[i], string.Concat(new object[]
         {
             "ガシャ排出された強化チップのIDが不正です:chipId=",
             num,
             ", userChipId=",
             num2
         }));
     }
     ChipDataMng.AddUserChipList(array);
     base.UpdateUserAssetsInventory(playCount);
     base.UpdateGashaInfo(playCount);
     return(array);
 }