Example #1
0
 public override void Initialize()
 {
     if (nextGuachaGuarantee != null && nextGuachaGuarantee.IsValid())
     {
         MonoBehaviourSingleton <GachaManager> .I.selectGacha.SetCrystalNum(nextGuachaGuarantee.crystalNum);
     }
     userCrystalNum = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.crystal;
     base.Initialize();
 }
Example #2
0
    public string CreateButtonBaseName(GachaList.Gacha gacha, GachaGuaranteeCampaignInfo guarantee, bool resultScene = false)
    {
        string text = string.Empty;

        if (!resultScene || (gacha != null && gacha.requiredItemId > 0))
        {
            text = gacha.buttonImg;
        }
        if (guarantee != null && guarantee.IsValid())
        {
            string buttonImageName = guarantee.GetButtonImageName();
            if (buttonImageName != string.Empty)
            {
                text = buttonImageName;
            }
            if (gacha.IsOncePurchase() && guarantee.IsStepUp())
            {
                text = "BTN_GACHA_STEP10_Pay";
            }
            if (guarantee.IsStepUp())
            {
                text = ((!guarantee.hasFreeGachaReward) ? (text + "_" + guarantee.GetImageCount()) : (text + "_FREE"));
            }
        }
        if (resultScene && MonoBehaviourSingleton <GachaManager> .I.gachaResult != null && !string.IsNullOrEmpty(MonoBehaviourSingleton <GachaManager> .I.gachaResult.buttonImg) && string.IsNullOrEmpty(text))
        {
            text = MonoBehaviourSingleton <GachaManager> .I.gachaResult.buttonImg;
        }
        if (string.IsNullOrEmpty(text))
        {
            text = "BTN_GACHA_NORMAL1" + ((gacha.num != 1) ? "0" : string.Empty);
        }
        return(text);
    }