예제 #1
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 void OnPushedConfirmYesButton()
 {
     if (null != this.cofirmDialog)
     {
         IPayConfirmNotice payConfirmNotice = this.cofirmDialog as IPayConfirmNotice;
         if (payConfirmNotice != null)
         {
             GameWebAPI.GA_Req_ExecGacha ga_Req_ExecGacha = payConfirmNotice.GetUseDetail() as GameWebAPI.GA_Req_ExecGacha;
             if (ga_Req_ExecGacha != null)
             {
                 ExecGashaBase execGashaBase = FactoryExecGasha.CreateExecGasha(this.gashaInfo, this.isTutorial);
                 if (execGashaBase != null)
                 {
                     AppCoroutine.Start(execGashaBase.Exec(ga_Req_ExecGacha, this.isTutorial), false);
                 }
             }
         }
         this.cofirmDialog.ClosePanel(true);
     }
 }