Beispiel #1
0
        internal static void ReplicateKeyEffect(Keyboard.EFFECT_TYPE effect, Keyboard.CUSTOM_EFFECT_TYPE customEffectType)
        {
            Util.WriteLog($"Replicating KeyEffect: {effect}");
            var colList = RGBA.FromUintArray(customEffectType.Color);

            int key = 4;
            var b   = EventBinding.GetOverwatchBinding("TEST", new List <BaseHandler>());

            foreach (var c in colList)
            {
                var h = PerKeyHandler.GetHandler(c, key);
                b.Handlers.Add(h);
                key++;
            }

            var e = GameEvent.GetGameEvent("TEST");

            Util.WriteLog("Binding TEST event");
            http.PostAsync("bind_game_event", b).ConfigureAwait(true);

            Util.WriteLog("Sending game event");
            http.PostAsync("game_event", e).ConfigureAwait(true);
        }