TrafficLight.Set C# (CSharp) Méthode

Set() public méthode

public Set ( bool green, bool yellow, bool red ) : void
green bool
yellow bool
red bool
Résultat void
    public void Set(bool green, bool yellow, bool red)
    {
        this.green.color
            = green
            ? this.greenBright
            : this.greenDim
            ;
        this.yellow.color
            = yellow
            ? this.yellowBright
            : this.yellowDim
            ;
        this.red.color
            = red
            ? this.redBright
            : this.redDim
            ;
    }
TrafficLight