public FXLight GetLight(int priority) { FXLight result = null; foreach (FXLight state in lights) { if (state.priority == priority) { result = state; break; } } if (result == null) { result = new FXLight(this, priority); lights.Add(result); } return result; }
///<Summary> /// Is the Alienware LightFX Loaded? /// Can only be loaded when AlienFX has been init or Loaded ///</Summary> public void loadAlienFX() { if(!isAlienFXLoaded()) { AlienFX.Load(); keyboardLight = AlienFX.GetLightByName("Keyboard"); if(keyboardLight == null) { Debug.LogError("Keyboard is null"); } else { zoneAll = AlienFX.GetZoneByPosition(LFX_Position.LFX_All); ChangeColor(Color.green); } } else { Debug.LogWarning("Alienware LightFX is not loaded"); } }