示例#1
0
    public static float MaxSpeedMult(this PartTrait trait)
    {
        switch (trait)
        {
        case PartTrait.BLUE: return(1.2F);

        default: return(1);
        }
    }
示例#2
0
    public static int PartHealthImpact(this PartTrait trait)
    {
        switch (trait)
        {
        case PartTrait.BLUE: return(20);

        default: return(0);
        }
    }
示例#3
0
    /**
     * Returns whether or not a trait inverts the car's steering (if the trait is enabled)
     */
    public static bool InvertsSteering(this PartTrait trait)
    {
        switch (trait)
        {
        case PartTrait.CONFUSED: return(true);

        default: return(false);
        }
    }
示例#4
0
    /**
     * Returns whether or not a trait disables the part it's on (if the trait is enabled)
     */
    public static bool DisablesOwnPart(this PartTrait trait)
    {
        switch (trait)
        {
        case PartTrait.BLUE:
        case PartTrait.ELECTRIC:
            return(true);

        default: return(false);
        }
    }
示例#5
0
    public static string Description(this PartTrait trait)
    {
        switch (trait)
        {
        case PartTrait.RED: return("Red: Disables blue parts");

        case PartTrait.BLUE: return("Blue: Part is more durable, but won't work if the car has Red parts.");

        case PartTrait.ELECTRIC: return("Electric: Works just fine, so long as you don't have too many.");

        case PartTrait.CONFUSED: return("Confused: Gives people Lego Racers flashbacks");

        default: return($"{trait}: NO_DESCRIPTION_FOR_TRAIT: ");
        }
    }