private void SetEffectStaticOnAll(Color color) { if (!this._mConnectionManager.Connected) { Debug.LogError("Chroma client is not yet connected!"); return; } ChromaApi apiChromaInstance = this._mConnectionManager.ApiChromaInstance; int value = ChromaUtils.ToBGR(color); ChromaExample01.LogResult("PutChromaLinkStatic:", apiChromaInstance.PutChromaLinkStatic(new int?(value))); ChromaExample01.LogResult("PutHeadsetStatic:", apiChromaInstance.PutHeadsetStatic(new int?(value))); ChromaExample01.LogResult("PutKeyboardStatic:", apiChromaInstance.PutKeyboardStatic(new int?(value))); ChromaExample01.LogResult("PutKeypadStatic:", apiChromaInstance.PutKeypadStatic(new int?(value))); ChromaExample01.LogResult("PutMouseStatic:", apiChromaInstance.PutMouseStatic(new int?(value))); ChromaExample01.LogResult("PutMousepadStatic:", apiChromaInstance.PutMousepadStatic(new int?(value))); }
/// <summary> /// Set static effect on all devices using PUT /// </summary> /// <param name="color"></param> void SetEffectStaticOnAll(Color color) { if (!_mConnectionManager.Connected) { Debug.LogError("Chroma client is not yet connected!"); return; } ChromaApi chromaApi = _mConnectionManager.ApiChromaInstance; int bgrInt = ChromaUtils.ToBGR(color); LogResult("PutChromaLinkStatic:", chromaApi.PutChromaLinkStatic(bgrInt)); LogResult("PutHeadsetStatic:", chromaApi.PutHeadsetStatic(bgrInt)); LogResult("PutKeyboardStatic:", chromaApi.PutKeyboardStatic(bgrInt)); LogResult("PutKeypadStatic:", chromaApi.PutKeypadStatic(bgrInt)); LogResult("PutMouseStatic:", chromaApi.PutMouseStatic(bgrInt)); LogResult("PutMousepadStatic:", chromaApi.PutMousepadStatic(bgrInt)); }