示例#1
0
    public int GetTankLevelUpCards(Rarity rarity, int level)
    {
        TankRarityProgression tankLevelUpRequirements = GetTankLevelUpRequirements(rarity);

        if (tankLevelUpRequirements == null || !tankLevelMinMax.ContainsExclusive(level))
        {
            return(-1);
        }
        return(tankLevelUpRequirements.levelUpCostCards[level]);
    }
示例#2
0
    public int GetMaxTankCardCount(Rarity rarity)
    {
        int num = 0;
        TankRarityProgression tankLevelUpRequirements = GetTankLevelUpRequirements(rarity);

        for (int i = 0; i != tankLevelUpRequirements.levelUpCostCards.Length; i++)
        {
            num += tankLevelUpRequirements.levelUpCostCards[i];
        }
        return(num);
    }
示例#3
0
    public int GetTankPossibleLevel(Tank tank, int cards)
    {
        TankRarityProgression tankLevelUpRequirements = instance.GetTankLevelUpRequirements(tank.rarity);
        int num = 0;

        for (int i = 0; i != tankLevelUpRequirements.levelUpCostCards.Length; i++)
        {
            num += tankLevelUpRequirements.levelUpCostCards[i];
            if (num > cards)
            {
                return(i);
            }
        }
        return(0);
    }
示例#4
0
    public int GetTankLevelUpCardsCumulative(Rarity rarity, int level)
    {
        TankRarityProgression tankLevelUpRequirements = GetTankLevelUpRequirements(rarity);

        if (level >= tankLevelMinMax.max)
        {
            level = tankLevelMinMax.max - 1;
        }
        int num = 0;

        for (int i = 0; i <= level; i++)
        {
            num += tankLevelUpRequirements.levelUpCostCards[i];
        }
        return(num);
    }