Esempio n. 1
0
    public void _initPlugins()
    {
        FB.Init(OnInitComplete);
        _isEnabled = true;
        Debug.Log("C# _initPlugins");
        _isInited    = true;
        _flurryProxy = new NerdFlurry();

        #if UNITY_ANDROID && !UNITY_EDITOR
        _flurryProxy.StartSession(Settings.instance.flurryAndroid);
        Debug.Log("C# CBBinding.init()");
        #elif UNITY_IPHONE && !UNITY_EDITOR
        _flurryProxy.StartSession(Settings.instance.flurryIOS);
        #endif
        #if (UNITY_ANDROID || UNITY_IPHONE) && !UNITY_EDITOR
        PlayHavenManager.instance.OpenNotification();
        #endif

        #if UNITY_ANDROID && !UNITY_EDITOR
        CBBinding.init();
        #elif UNITY_IPHONE && !UNITY_EDITOR
        CBBinding.init(Settings.instance.chartboostID, Settings.instance.chartboostSignature);
        #endif
        CBBinding.cacheInterstitial(null);
        CBBinding.cacheMoreApps();

        PlayHavenManager.instance.ContentPreloadRequest(Settings.instance.playhavenFullscreen);
    }
Esempio n. 2
0
    void OnGUI()
    {
        GUILayout.BeginVertical();

        if (GUILayout.Button("Start Flurry", GUILayout.Height(60)))
        {
            mNerdFlurry.StartSession(FLURRY_API_KEY);
        }
        if (GUILayout.Button("Agent Version", GUILayout.Height(60)))
        {
            Debug.Log("Agent version is " + mNerdFlurry.GetAgentVersion());
        }
        if (GUILayout.Button("Log Event 1", GUILayout.Height(60)))
        {
            mNerdFlurry.LogEvent("Event 2");
        }
        if (GUILayout.Button("Log Event 1 with params", GUILayout.Height(60)))
        {
            Dictionary <string, string> kvps = new Dictionary <string, string>();
            kvps.Add("GameName", "MyGame");
            kvps.Add("Level", "Level1");
            mNerdFlurry.LogEvent("Event 3", kvps);
        }

        if (GUILayout.Button("Timed Log Event 1 with params", GUILayout.Height(60)))
        {
            Dictionary <string, string> kvps = new Dictionary <string, string>();
            kvps.Add("GameName", "MyGame");
            kvps.Add("Level", "Level1");
            mNerdFlurry.LogEvent("Timer 2", kvps, true);
        }

        if (GUILayout.Button("Timed Event Start", GUILayout.Height(60)))
        {
            Dictionary <string, string> kvps = new Dictionary <string, string>();
            kvps.Add("TGameName", "MyGame");
            kvps.Add("TLevel", "Level1");
            mNerdFlurry.LogEvent("Timer 2", kvps, true);
        }

        if (GUILayout.Button("Timed Event End", GUILayout.Height(60)))
        {
            mNerdFlurry.EndTimedEvent("Timer 2");
        }

        if (GUILayout.Button("End Session", GUILayout.Height(60)))
        {
            mNerdFlurry.EndSession();
        }

        GUILayout.EndVertical();
    }