Ejemplo n.º 1
0
    public static string GetBoosterNextUpgradeString(BoosterEnum booster)
    {
        string empty = string.Empty;

        if (IsBoosterMultiplier(booster))
        {
            return("+" + PersistentSingleton <Economies> .Instance.Boosters[(int)booster].RewardAmount.ToString() + "X");
        }
        int duration = (int)PersistentSingleton <Economies> .Instance.Boosters[(int)booster].RewardAmount;

        return("+" + FormatSecondsForBoosters(duration));
    }
Ejemplo n.º 2
0
    public static bool IsBoosterMultiplier(BoosterEnum booster)
    {
        switch (booster)
        {
        case BoosterEnum.DamageMultiplier:
        case BoosterEnum.GoldMultiplier:
        case BoosterEnum.ShardMultiplier:
        case BoosterEnum.DailyDoubleBoost:
        case BoosterEnum.KeyDropChance:
        case BoosterEnum.BerryDropChance:
            return(true);

        default:
            return(false);
        }
    }
Ejemplo n.º 3
0
    public static string GetBoosterBonusString(BoosterEnum booster)
    {
        string empty = string.Empty;

        if (IsBoosterMultiplier(booster))
        {
            if (PlayerData.Instance.BoostersEffect[(int)booster].Value % 1f != 0f)
            {
                return(PlayerData.Instance.BoostersEffect[(int)booster].Value.ToString("0.0") + "X");
            }
            return(PlayerData.Instance.BoostersEffect[(int)booster].Value.ToString() + "X");
        }
        if (booster == BoosterEnum.HammerDuration)
        {
            int duration = (int)PlayerData.Instance.BoostersEffect[(int)booster].Value + PersistentSingleton <GameSettings> .Instance.GoldenHammerInitialDuration;
            return(FormatSecondsForBoosters(duration));
        }
        int duration2 = (int)PlayerData.Instance.BoostersEffect[(int)booster].Value;

        return(FormatSecondsForBoosters(duration2));
    }
Ejemplo n.º 4
0
 public void GiveBooster(BoosterEnum booster, float reward)
 {
     PlayerData.Instance.BoostersEffect[(int)booster].Value += reward;
 }