Ejemplo n.º 1
0
    private Slider PickSlider(StatPack.StatType type)
    {
        switch (type)
        {
        case StatPack.StatType.Acceleration:
            return(transform.Find("AccelerationSlider").GetComponent <Slider>());

        case StatPack.StatType.Armor:
            return(transform.Find("ArmorSlider").GetComponent <Slider>());

        case StatPack.StatType.Grip:
            return(transform.Find("GripSlider").GetComponent <Slider>());

        case StatPack.StatType.Health:
            return(transform.Find("HealthSlider").GetComponent <Slider>());

        case StatPack.StatType.Nitro:
            return(transform.Find("NitroSlider").GetComponent <Slider>());

        case StatPack.StatType.TopSpeed:
            return(transform.Find("TopSpeedSlider").GetComponent <Slider>());

        case StatPack.StatType.Weight:
            return(transform.Find("WeightSlider").GetComponent <Slider>());

        default:
            return(null);
        }
    }
Ejemplo n.º 2
0
 public static float CurrentStatValue(StatPack.StatType type)
 {
     return(currentStats.GetAdd(type));
 }
Ejemplo n.º 3
0
 public static float MaxStatValue(StatPack.StatType stat)
 {
     return((baseStats.GetAdd(stat) + maxStats.GetAdd(stat)) * (1 + maxStats.GetMult(stat)));
 }