Esempio n. 1
0
    public void setBrakeLight(BrakeStatus status)
    {
        if (brakeEmissiveObject != null)
        {
            switch (status)
            {
            case BrakeStatus.on:
                brakeEmissiveObject.renderer.material.SetColor("_EmissiveColor", new Color(onEmissiveColor.x, onEmissiveColor.y, onEmissiveColor.z));
                break;

            case BrakeStatus.off:
                brakeEmissiveObject.renderer.material.SetColor("_EmissiveColor", new Color(offEmissiveColor.x, offEmissiveColor.y, offEmissiveColor.z));
                break;

            case BrakeStatus.deploying:
                brakeEmissiveObject.renderer.material.SetColor("_EmissiveColor", new Color(deployingEmissiveColor.x, deployingEmissiveColor.y, deployingEmissiveColor.z));
                break;

            case BrakeStatus.disabled:
                brakeEmissiveObject.renderer.material.SetColor("_EmissiveColor", new Color(disabledEmissiveColor.x, disabledEmissiveColor.y, disabledEmissiveColor.z));
                break;
            }
        }
    }
 public void setBrakeLight(BrakeStatus status)
 {
     if (brakeEmissiveObject != null)
     {
         switch (status)
         {
             case BrakeStatus.on:
                 brakeEmissiveObject.GetComponent<Renderer>().material.SetColor("_EmissiveColor", new Color(onEmissiveColor.x, onEmissiveColor.y, onEmissiveColor.z));
                 break;
             case BrakeStatus.off:
                 brakeEmissiveObject.GetComponent<Renderer>().material.SetColor("_EmissiveColor", new Color(offEmissiveColor.x, offEmissiveColor.y, offEmissiveColor.z));
                 break;
             case BrakeStatus.deploying:
                 brakeEmissiveObject.GetComponent<Renderer>().material.SetColor("_EmissiveColor", new Color(deployingEmissiveColor.x, deployingEmissiveColor.y, deployingEmissiveColor.z));
                 break;
             case BrakeStatus.disabled:
                 brakeEmissiveObject.GetComponent<Renderer>().material.SetColor("_EmissiveColor", new Color(disabledEmissiveColor.x, disabledEmissiveColor.y, disabledEmissiveColor.z));
                 break;
         }
     }
 }