示例#1
0
    /// <summary>
    /// Creates a Tapjoy event with the specified parameters.
    /// </summary>
    /// <param name='eventName'>
    /// Event name.
    /// </param>
    /// <param name='eventParameters'>
    /// Event parameters.
    /// </param>
    public static string CreateEvent(TapjoyEvent eventRef, string eventName, string eventParameter)
    {
        if (Application.isEditor)
        {
            return(null);
        }

        Guid   guid      = Guid.NewGuid();
        string eventGuid = guid.ToString();

        while (eventDictionary.ContainsKey(eventGuid))
        {
            guid      = Guid.NewGuid();
            eventGuid = guid.ToString();
        }

        eventDictionary.Add(eventGuid, eventRef);

        TapjoyPlatformPlugin.CreateEvent(eventGuid, eventName, eventParameter);

        return(eventGuid);
    }