private static void CreateNewEvent(string eventName, float?eventValue, IDictionary <string, object> fields) { if (!eventValue.HasValue) { GA_Wrapper.AddDesignEvent(eventName, fields); return; } GA_Wrapper.AddDesignEvent(eventName, eventValue.Value, fields); }
/// <summary> /// Adds a custom event to the submit queue (see GA_Queue) /// </summary> /// <param name="eventName"> /// Identifies the event so this should be as descriptive as possible. PickedUpAmmo might be a good event name. EventTwo is a bad event name! <see cref="System.String"/> /// </param> /// <param name="eventValue"> /// A value relevant to the event. F.x. if the player picks up some shotgun ammo the eventName could be "PickedUpAmmo" and this value could be "Shotgun". This can be null <see cref="System.Nullable<System.Single>"/> /// </param> /// <param name="x"> /// The x coordinate of the event occurence. This can be null <see cref="System.Nullable<System.Single>"/> /// </param> /// <param name="y"> /// The y coordinate of the event occurence. This can be null <see cref="System.Nullable<System.Single>"/> /// </param> private static void CreateNewEvent(string eventName, float?eventValue) { if (eventValue.HasValue) { GA_Wrapper.AddDesignEvent(eventName, eventValue.Value); } else { GA_Wrapper.AddDesignEvent(eventName); } }
/// <summary> /// Adds a custom event to the submit queue (see GA_Queue) /// </summary> /// <param name="eventName"> /// Identifies the event so this should be as descriptive as possible. PickedUpAmmo might be a good event name. EventTwo is a bad event name! <see cref="System.String"/> /// </param> /// <param name="eventValue"> /// A value relevant to the event. F.x. if the player picks up some shotgun ammo the eventName could be "PickedUpAmmo" and this value could be "Shotgun". This can be null <see cref="System.Nullable<System.Single>"/> /// </param> /// <param name="fields">Custom fields.</param> private static void CreateNewEvent(string eventName, float?eventValue, IDictionary <string, object> fields, bool mergeFields) { if (eventValue.HasValue) { GA_Wrapper.AddDesignEvent(eventName, eventValue.Value, fields, mergeFields); } else { GA_Wrapper.AddDesignEvent(eventName, fields, mergeFields); } }