public Register_Event(string gameName, string eventName, System.Int32 minValue, System.Int32 maxValue, EventIconId iconId)
 {
     this.game      = gameName;
     this.eventName = eventName;
     this.minValue  = minValue;
     this.maxValue  = maxValue;
     this.iconId    = iconId;
 }
 public Bind_Event(string gameName, string eventName, System.Int32 minValue, System.Int32 maxValue, EventIconId iconId, AbstractHandler[] handlers)
 {
     this.game      = gameName;
     this.eventName = eventName;
     this.minValue  = minValue;
     this.maxValue  = maxValue;
     this.iconId    = iconId;
     this.handlers  = handlers;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Binds event.
 /// </summary>
 public static void BindEvent(string eventName, int minValue, int maxValue, EventIconId iconId, string[] handlers)
 {
     if (handlers.Length == 0)
     {
         m_client.RegisterEvent(m_gameName, eventName, minValue, maxValue, iconId);
     }
     else
     {
         m_client.BindEvent(m_gameName, eventName, minValue, maxValue, iconId, handlers);
     }
 }
            /// <summary>
            /// Defines an event and registers it with the GameSense Server.
            /// </summary>
            /// <param name="eventName">Event name. Valid characters are limited to uppercase A-Z, the digits 0-9, hyphen, and underscore</param>
            /// <remarks>
            /// You should call this function if you do not want specify default behavior for events but rather want it exposed in SteelSeries Engine for the user to customize.
            /// If you wish to specify default behavior (handlers), use <see cref="GSClient.BindEvent"/> instead
            /// </remarks>
            /// <param name="minValue">Minimum value</param>
            /// <param name="maxValue">Maximum value</param>
            /// <param name="iconId">Identifies an icon that will be show in SteelSeries Engine for this event</param>
            public void RegisterEvent(string eventName, System.Int32 minValue, System.Int32 maxValue, EventIconId iconId)
            {
#if (UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX) && !SS_GAMESENSE_DISABLED
                if (!_isClientActive())
                {
                    return;
                }

                QueueMsgRegisterEvent msg = new QueueMsgRegisterEvent();
                msg.data = new Register_Event(GameName.ToUpper(), eventName.ToUpper(), minValue, maxValue, iconId);

                _mMsgQueue.PEnqueue(msg);
#endif  // (UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX) && !SS_GAMESENSE_DISABLED
            }
Ejemplo n.º 5
0
        public void BindEvent(string gameName, string eventName, int minValue, int maxValue, EventIconId iconId, string[] handlers)
        {
            string msg = $@"
            {{
                ""game"": ""{gameName}"",
                ""event"": ""{eventName}"",
                ""min_value"": {minValue},
                ""max_value"": {maxValue},
                ""icon_id"": {(int)iconId},
                ""handlers"": [
                    {string.Join(", ", handlers)}
                ]
            }}";

            SendCustomMessage("bind_game_event", msg);
        }
Ejemplo n.º 6
0
        public void RegisterEvent(string gameName, string eventName, int minValue, int maxValue, EventIconId iconId, bool valueOptional = false)
        {
            string valueOptionalText = valueOptional ? "true" : "false";
            string msg = $@"
            {{
                ""game"": ""{gameName}"",
                ""event"": ""{eventName}"",
                ""min_value"": {minValue},
                ""max_value"": {maxValue},
                ""icon_id"": {(int)iconId},
                ""value_optional"": {valueOptionalText}
            }}";

            SendCustomMessage("register_game_event", msg);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Registers event.
 /// </summary>
 public static void RegisterEvent(string eventName, int minValue, int maxValue, EventIconId iconId, bool valueOptional = false)
 {
     m_client.RegisterEvent(m_gameName, eventName, minValue, maxValue, iconId, valueOptional);
 }
Ejemplo n.º 8
0
 public Register_Event(string gameName, string eventName, int minValue, int maxValue, EventIconId iconId)
 {
 }
Ejemplo n.º 9
0
 public Bind_Event(string gameName, string eventName, int minValue, int maxValue, EventIconId iconId, AbstractHandler[] handlers)
 {
 }
Ejemplo n.º 10
0
 public Bind_Event(string gameName, string eventName, string defaultDisplayName, Dictionary <string, string> localizedDisplayNames, int minValue, int maxValue, EventIconId iconId, AbstractHandler[] handlers)
 {
 }