public void RingGray() { //UnityNativeChromaSDK.PlayAnimationName("Blank_Keyboard.chroma"); baseLayer = "RingGray_Keyboard.chroma"; UnityNativeChromaSDK.CloseAnimationName(baseLayer); UnityNativeChromaSDK.MultiplyIntensityAllFramesName(baseLayer, 1.0f + 64.0f * _mBaseIntensity); List <int> keyList = new List <int>(); if (w) { keyList.Add((int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_W); } if (a) { keyList.Add((int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_A); } if (s) { keyList.Add((int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_S); } if (d) { keyList.Add((int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_D); } int[] keys = keyList.ToArray(); Color color = new Color(_mHotkeyIntensity * 1, _mHotkeyIntensity * 0.5f, 0); UnityNativeChromaSDK.SetKeysColorAllFramesName(baseLayer, keys, color); UnityNativeChromaSDK.PlayAnimationName(baseLayer, true); }
private void ClickHeal() { int[] keys = new int[] { (int)UnityNativeChromaSDK.Keyboard.RZLED.RZLED_LOGO, (int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_ESC, (int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_Q, (int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_E }; string baseLayer = "EnvironmentSnow_Keyboard.chroma"; UnityNativeChromaSDK.CloseAnimationName(baseLayer); UnityNativeChromaSDK.MultiplyIntensityAllFramesName(baseLayer, 1.0f + 64.0f * _mBaseIntensity); string layer2 = "RingGray_Keyboard.chroma"; UnityNativeChromaSDK.CloseAnimationName(layer2); // turn animation green UnityNativeChromaSDK.OffsetNonZeroColorsAllFramesName(layer2, -127, 127, -127); //animation starts with 127,127,127 so adding -127,127,-127 results in 0,255,0 or green // set intensity UnityNativeChromaSDK.MultiplyIntensityAllFramesName(layer2, _mEffectIntensity); UnityNativeChromaSDK.CopyNonZeroAllKeysAllFramesName(layer2, baseLayer); string layer3 = "FadeInOutGray_Keyboard.chroma"; UnityNativeChromaSDK.CloseAnimationName(layer3); // change color UnityNativeChromaSDK.OffsetNonZeroColorsAllFramesName(layer3, 173 - 127, 255 - 127, 47 - 127); // set intensity UnityNativeChromaSDK.MultiplyIntensityAllFramesName(layer3, _mHotkeyIntensity); UnityNativeChromaSDK.CopyKeysColorAllFramesName(layer3, baseLayer, keys); keys = new int[] { (int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_W, (int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_A, (int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_S, (int)UnityNativeChromaSDK.Keyboard.RZKEY.RZKEY_D }; Color color = new Color(_mHotkeyIntensity * 1, _mHotkeyIntensity * 0.5f, 0); UnityNativeChromaSDK.SetKeysColorAllFramesName(baseLayer, keys, color); UnityNativeChromaSDK.PlayAnimationName(baseLayer, true); }