Esempio n. 1
0
 private bool UpdateButtonImage(GachaButton.GachaCostType cost = GachaButton.GachaCostType.NONE)
 {
     if (cost == GachaButton.GachaCostType.NONE || cost == GachaButton.GachaCostType.ALL)
     {
         return(false);
     }
     ((ImageArray)this.gachaBtn.GetComponent <ImageArray>()).ImageIndex = cost != GachaButton.GachaCostType.COIN_P ? 0 : 1;
     return(true);
 }
Esempio n. 2
0
    private static string GetGachaSummonCostTypeString(GachaButton.GachaCostType inGachaCostType)
    {
        int num = (int)inGachaCostType;

        if (num > -1 && num < AnalyticsManager.GachaCostType.Length)
        {
            return(AnalyticsManager.GachaCostType[(int)inGachaCostType]);
        }
        return((string)null);
    }
Esempio n. 3
0
 public bool SetGachaButtonUIParameter(GachaButton.GachaCostType cost_type = GachaButton.GachaCostType.NONE, GachaButton.GachaCategoryType category_type = GachaButton.GachaCategoryType.NONE)
 {
     if (cost_type == GachaButton.GachaCostType.NONE || cost_type == GachaButton.GachaCostType.ALL || (category_type == GachaButton.GachaCategoryType.NONE || category_type == GachaButton.GachaCategoryType.ALL))
     {
         return(false);
     }
     this.mCostType      = cost_type;
     this.mCategoryType  = category_type;
     this.mUpdateTrigger = true;
     return(true);
 }
Esempio n. 4
0
        private bool UpdateCostBG(GachaButton.GachaCostType cost = GachaButton.GachaCostType.NONE)
        {
            if (cost == GachaButton.GachaCostType.NONE || cost == GachaButton.GachaCostType.ALL || Object.op_Equality((Object)this.CostBG, (Object)null))
            {
                return(false);
            }
            Transform parent = this.costBG.get_transform().get_parent();

            if (Object.op_Equality((Object)parent, (Object)null))
            {
                return(false);
            }
            if (cost == GachaButton.GachaCostType.TICKET)
            {
                ((Component)parent).get_gameObject().SetActive(false);
            }
            else
            {
                ((Component)parent).get_gameObject().SetActive(true);
            }
            ((ImageArray)this.CostBG.GetComponent <ImageArray>()).ImageIndex = cost == GachaButton.GachaCostType.COIN || cost == GachaButton.GachaCostType.COIN_P ? 0 : 1;
            return(true);
        }
Esempio n. 5
0
    public static void SetSummonTracking(GachaButton.GachaCostType inCostType, GachaWindow.GachaTabCategory inTabCategory, string inGateID, bool inIsFree, int inSummonCost, int inNumberOfThingsSummoned, int inCurrentSummonStepIndex)
    {
        string str;

        if (inIsFree)
        {
            switch (inCostType)
            {
            case GachaButton.GachaCostType.COIN:
                str = "Rare (Free)";
                break;

            case GachaButton.GachaCostType.GOLD:
                str = "Normal (Free)";
                break;

            default:
                str = string.Empty;
                break;
            }
        }
        else
        {
            switch (inCostType)
            {
            case GachaButton.GachaCostType.COIN:
                str = "Rare (Paid)";
                break;

            case GachaButton.GachaCostType.COIN_P:
                str = "Rare (Discount)";
                break;

            case GachaButton.GachaCostType.GOLD:
                str = "Normal (Zeni)";
                break;

            default:
                str = string.Empty;
                break;
            }
        }
        AnalyticsManager.summonData = new Dictionary <string, object>()
        {
            {
                "main_type",
                (object)AnalyticsManager.GetGachaSummonTypeString(inTabCategory)
            },
            {
                "sub_type",
                (object)str
            },
            {
                "currency_used",
                (object)AnalyticsManager.GetGachaSummonCostTypeString(inCostType)
            },
            {
                "currency_amount",
                (object)inSummonCost
            },
            {
                "gate_id",
                (object)inGateID
            },
            {
                "step_id",
                (object)inCurrentSummonStepIndex
            },
            {
                "step_reward_id",
                (object)string.Empty
            },
            {
                "step_reward_amount",
                (object)inNumberOfThingsSummoned
            }
        };
    }
Esempio n. 6
0
 private bool UpdateOptionObject(GachaButton.GachaCategoryType category = GachaButton.GachaCategoryType.NONE, GachaButton.GachaCostType cost = GachaButton.GachaCostType.NONE)
 {
     if (category == GachaButton.GachaCategoryType.NONE || category == GachaButton.GachaCategoryType.ALL || (cost == GachaButton.GachaCostType.NONE || cost == GachaButton.GachaCostType.ALL))
     {
         return(false);
     }
     this.optionLayout.SetActive(false);
     this.optionLayout2.SetActive(false);
     this.paidOption.SetActive(false);
     this.timerOption.SetActive(false);
     this.stepupOption.SetActive(false);
     if (cost == GachaButton.GachaCostType.COIN_P)
     {
         this.optionLayout2.SetActive(true);
         this.paidOption.SetActive(true);
     }
     if (cost == GachaButton.GachaCostType.TICKET)
     {
         if (Object.op_Inequality((Object)this.TicketState, (Object)null))
         {
             Text component = (Text)this.TicketState.GetComponent <Text>();
             if (Object.op_Inequality((Object)component, (Object)null))
             {
                 component.set_text(this.TicketNum.ToString());
                 this.optionLayout.SetActive(true);
             }
         }
     }
     else if (category == GachaButton.GachaCategoryType.STEPUP)
     {
         if (Object.op_Inequality((Object)this.StepupState, (Object)null))
         {
             if (Object.op_Equality((Object)this.mCurrentStepup10, (Object)null))
             {
                 Transform child = this.StepupState.get_transform().FindChild("current_10");
                 this.mCurrentStepup10 = !Object.op_Inequality((Object)child, (Object)null) ? (GameObject)null : ((Component)child).get_gameObject();
             }
             if (Object.op_Equality((Object)this.mCurrentStepup1, (Object)null))
             {
                 Transform child = this.StepupState.get_transform().FindChild("current_1");
                 this.mCurrentStepup1 = !Object.op_Inequality((Object)child, (Object)null) ? (GameObject)null : ((Component)child).get_gameObject();
             }
             if (Object.op_Equality((Object)this.mMaxStepup10, (Object)null))
             {
                 Transform child = this.StepupState.get_transform().FindChild("max_10");
                 this.mMaxStepup10 = !Object.op_Inequality((Object)child, (Object)null) ? (GameObject)null : ((Component)child).get_gameObject();
             }
             if (Object.op_Equality((Object)this.mMaxStepup1, (Object)null))
             {
                 Transform child = this.StepupState.get_transform().FindChild("max_1");
                 this.mMaxStepup1 = !Object.op_Inequality((Object)child, (Object)null) ? (GameObject)null : ((Component)child).get_gameObject();
             }
             if (Object.op_Equality((Object)this.mCurrentStepup1, (Object)null) || Object.op_Equality((Object)this.mCurrentStepup10, (Object)null) || (Object.op_Equality((Object)this.mMaxStepup1, (Object)null) || Object.op_Equality((Object)this.mMaxStepup10, (Object)null)))
             {
                 return(false);
             }
             int num1 = (this.StepIndex + 1) % 10;
             int num2 = (this.StepIndex + 1) / 10;
             int num3 = this.StepMax % 10;
             int num4 = this.StepMax / 10;
             ((ImageArray)this.mCurrentStepup1.GetComponent <ImageArray>()).ImageIndex  = num1;
             ((ImageArray)this.mCurrentStepup10.GetComponent <ImageArray>()).ImageIndex = num2;
             ((ImageArray)this.mMaxStepup10.GetComponent <ImageArray>()).ImageIndex     = num4;
             ((ImageArray)this.mMaxStepup1.GetComponent <ImageArray>()).ImageIndex      = num3;
             this.mCurrentStepup10.SetActive(num2 > 0);
             this.mMaxStepup10.SetActive(num4 > 0);
             this.optionLayout.SetActive(true);
             this.stepupOption.SetActive(true);
         }
     }
     else if ((this.Category == "coin_1" || this.Category == "gold_1") && (Object.op_Inequality((Object)this.TimerObject, (Object)null) && Object.op_Inequality((Object)this.LimitObject, (Object)null)))
     {
         bool flag = true;
         if (this.mCostType == GachaButton.GachaCostType.FREE_COIN || this.mCostType == GachaButton.GachaCostType.COIN)
         {
             this.UpdateTimer(this.gm.Player.GetNextFreeGachaCoinCoolDownSec());
             this.UpdateLimit(1 - this.gm.Player.FreeGachaCoin.num);
             flag = this.gm.Player.CheckFreeGachaCoin();
         }
         else if (this.mCostType == GachaButton.GachaCostType.FREE_GOLD || this.mCostType == GachaButton.GachaCostType.GOLD)
         {
             this.UpdateTimer(this.gm.Player.GetNextFreeGachaGoldCoolDownSec());
             this.UpdateLimit((int)this.gm.MasterParam.FixParam.FreeGachaGoldMax - this.gm.Player.FreeGachaGold.num);
             flag = this.gm.Player.CheckFreeGachaGold();
         }
         this.TimerObject.SetActive(!flag);
         this.LimitObject.SetActive(flag);
         this.optionLayout.SetActive(true);
         this.timerOption.SetActive(true);
     }
     return(true);
 }