Пример #1
0
 // Start is called before the first frame update
 void Start()
 {
     // Initialize and set target device
     Led.Init("UniG Demo App");
     Led.SetTargetDevice((int)Led.DeviceLightingType.All);
     // Highlight the WASD keys
     Led.SetLightingForKeyWithKeyName(KeyCode.W, 100, 100, 100);
     Led.SetLightingForKeyWithKeyName(KeyCode.A, 100, 100, 100);
     Led.SetLightingForKeyWithKeyName(KeyCode.S, 100, 100, 100);
     Led.SetLightingForKeyWithKeyName(KeyCode.D, 100, 100, 100);
     // Get the health colors
     healthGood = GetColor("Lives/Good", Led.UnityToPercentage(Color.green));
     healthMid  = GetColor("Lives/Medium", new Color(100, 50, 0));
     healthCrit = GetColor("Lives/Bad", Led.UnityToPercentage(Color.red));
     // Set initialized to true
     initialized = true;
 }