Exemplo n.º 1
0
 private GachaList.Gacha FindGacha(int gachaId, int gachaIndex, out GACHA_TYPE gacha_type, out GACHA_TYPE real_type, out GachaGuaranteeCampaignInfo guaranteeInfo)
 {
     GachaList.Gacha result = null;
     gacha_type    = (GACHA_TYPE)0;
     real_type     = (GACHA_TYPE)0;
     guaranteeInfo = new GachaGuaranteeCampaignInfo();
     for (int i = 0; i < gachaData.types.Count; i++)
     {
         GachaList.GachaType gachaType = gachaData.types[i];
         for (int j = 0; j < gachaType.groups.Count; j++)
         {
             GachaList.GachaGroup gachaGroup = gachaType.groups[j];
             if (gachaGroup.gachas.Count > gachaIndex)
             {
                 GachaList.Gacha gacha = gachaGroup.gachas[gachaIndex];
                 if (gacha.gachaId == gachaId)
                 {
                     result        = gacha;
                     gacha_type    = gachaType.ViewType;
                     real_type     = gachaType.Type;
                     guaranteeInfo = gachaGroup.gachaGuaranteeCampaignInfo.Find((GachaGuaranteeCampaignInfo info) => info.gachaId == gachaId);
                     if (guaranteeInfo == null)
                     {
                         guaranteeInfo = new GachaGuaranteeCampaignInfo();
                     }
                     return(result);
                 }
             }
         }
     }
     return(result);
 }
Exemplo n.º 2
0
    public void OnQuery_BANNER_GACHA()
    {
        GACHA_TYPE gACHA_TYPE = (GACHA_TYPE)(int)GetEventData();

        EventData[] autoEvents = (!MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(TUTORIAL_MENU_BIT.SKILL_EQUIP)) ? new EventData[1]
        {
            new EventData("MAIN_MENU_SHOP", null)
        } : ((gACHA_TYPE != GACHA_TYPE.SKILL) ? new EventData[2]
        {
            new EventData("MAIN_MENU_SHOP", null),
            new EventData("QUEST_GACHA", null)
        } : new EventData[2]
        {
            new EventData("MAIN_MENU_SHOP", null),
            new EventData("MAGI_GACHA", null)
        });
        StopEvent();
        MonoBehaviourSingleton <GameSceneManager> .I.SetAutoEvents(autoEvents);
    }
Exemplo n.º 3
0
 private bool IsExistGachaType(GACHA_TYPE targetType)
 {
     if (gachaData == null)
     {
         return(false);
     }
     if (gachaData.types == null || gachaData.types.Count <= 0)
     {
         return(false);
     }
     foreach (GachaList.GachaType type in gachaData.types)
     {
         if (type.type == (int)targetType)
         {
             return(true);
         }
     }
     return(false);
 }