Пример #1
0
    private void OnApplicationPause(bool pause)
    {
        UnityEngine.Debug.LogWarning("OnApplicationPause  == " + pause);
        if (TsPlatform.IsMobile)
        {
            if (NmFacebookManager.instance.IsFacebook)
            {
                return;
            }
            if (NrTSingleton <NrMainSystem> .Instance.m_bIsBilling)
            {
                return;
            }
            GameObject gameObject = GameObject.Find("OmniataManager");
            if (gameObject == null)
            {
                gameObject = new GameObject("OmniataManager");
            }
            if (gameObject != null)
            {
                OmniataComponent component = gameObject.GetComponent <OmniataComponent>();
                if (component && !pause)
                {
                    DateTime dateTime  = DateTime.Now.ToLocalTime();
                    DateTime arg_AE_0  = dateTime;
                    DateTime dateTime2 = new DateTime(1970, 1, 1, 0, 0, 0, 0);
                    int      num       = (int)(arg_AE_0 - dateTime2.ToLocalTime()).TotalSeconds;
                    Dictionary <string, string> dictionary = new Dictionary <string, string>();
                    dictionary.Add("ts", num.ToString());
                    dictionary.Add("step", "pauseoff");
                    dictionary.Add("device", SystemInfo.deviceUniqueIdentifier);
                    if (TsPlatform.IsAndroid)
                    {
                        dictionary.Add("version", TsPlatform.APP_VERSION_AND);
                    }
                    else if (TsPlatform.IsIPhone)
                    {
                        dictionary.Add("version", TsPlatform.APP_VERSION_IOS);
                    }
                    component.TrackLoad(dictionary);
                }
            }
            if (pause && Scene.CurScene > Scene.Type.LOGIN)
            {
                NrTSingleton <FiveRocksEventManager> .Instance.Placement("Game_end");

                UnityEngine.Debug.LogWarning("OnApplicationPause");
                NrTSingleton <NrMainSystem> .Instance.OnApplicationPause();

                BaseNet_Game.GetInstance().Quit();
            }
            else if (NrWebViewObject.GetGameObject() == null)
            {
                UnityEngine.Debug.LogWarning("NrWebViewObject == NULL");
            }
        }
    }
Пример #2
0
    public static void appDidLaunch(string appToken, AdjustUtil.AdjustEnvironment environment, AdjustUtil.LogLevel logLevel, bool eventBuffering)
    {
        if (Adjust.instance != null)
        {
            Debug.Log("adjust: warning, SDK already started. Restarting");
        }
        Adjust.instance = new AdjustAndroid();
        if (Adjust.instance == null)
        {
            Debug.Log("adjust: SDK can only be used in Android, iOS, Windows Phone 8 or Windows Store apps");
            return;
        }
        Adjust.instance.appDidLaunch(appToken, environment, "unity3.3.0", logLevel, eventBuffering);
        GameObject gameObject = GameObject.Find("OmniataManager");

        if (gameObject == null)
        {
            return;
        }
        OmniataComponent component = gameObject.GetComponent <OmniataComponent>();

        if (component == null)
        {
            return;
        }
        Omniata omniataInstance = component.GetOmniataInstance();

        if (omniataInstance == null)
        {
            return;
        }
        if (!omniataInstance.Initialized)
        {
            return;
        }
        string eventToken = string.Empty;

        eventToken = "fyn6ku";
        Adjust.trackEvent(eventToken, new Dictionary <string, string>
        {
            {
                "user",
                omniataInstance.UserID
            },
            {
                "api_key",
                omniataInstance.ApiKey
            }
        });
    }
Пример #3
0
    public static void OnAdjustResult(ResponseData responseDelegate)
    {
        if (StageSystemCheck.pkGoOminiata == null)
        {
            return;
        }
        OmniataComponent component = StageSystemCheck.pkGoOminiata.GetComponent <OmniataComponent>();

        if (component == null)
        {
            return;
        }
        if (responseDelegate.activityKind == ResponseData.ActivityKind.SESSION)
        {
            component.Track("om_adjust", new Dictionary <string, string>
            {
                {
                    "adgroup",
                    responseDelegate.adgroup
                },
                {
                    "campaign",
                    responseDelegate.campaign
                },
                {
                    "creative",
                    responseDelegate.creative
                },
                {
                    "network",
                    responseDelegate.network
                },
                {
                    "trackerName",
                    responseDelegate.trackerName
                },
                {
                    "trackerToken",
                    responseDelegate.trackerToken
                }
            });
        }
    }
Пример #4
0
    public static void DownloadOmniataLog(bool bStart)
    {
        DateTime dateTime  = DateTime.Now.ToLocalTime();
        DateTime arg_29_0  = dateTime;
        DateTime dateTime2 = new DateTime(1970, 1, 1, 0, 0, 0, 0);
        int      num       = (int)(arg_29_0 - dateTime2.ToLocalTime()).TotalSeconds;
        Dictionary <string, string> dictionary = new Dictionary <string, string>();

        dictionary.Add("ts", num.ToString());
        if (bStart)
        {
            dictionary.Add("step", "loading_start");
        }
        else
        {
            dictionary.Add("step", "loading_complete");
        }
        dictionary.Add("device", SystemInfo.deviceUniqueIdentifier);
        if (TsPlatform.IsAndroid)
        {
            dictionary.Add("version", TsPlatform.APP_VERSION_AND);
        }
        else if (TsPlatform.IsIPhone)
        {
            dictionary.Add("version", TsPlatform.APP_VERSION_IOS);
        }
        GameObject pkGoOminiata = StageSystemCheck.pkGoOminiata;

        if (pkGoOminiata)
        {
            OmniataComponent component = pkGoOminiata.GetComponent <OmniataComponent>();
            if (component)
            {
                component.TrackLoad(dictionary);
            }
        }
    }
Пример #5
0
    public static void FileDownloadOmniataLog(string strPath)
    {
        DateTime dateTime  = DateTime.Now.ToLocalTime();
        DateTime arg_29_0  = dateTime;
        DateTime dateTime2 = new DateTime(1970, 1, 1, 0, 0, 0, 0);
        int      num       = (int)(arg_29_0 - dateTime2.ToLocalTime()).TotalSeconds;
        Dictionary <string, string> dictionary = new Dictionary <string, string>();

        dictionary.Add("ts", num.ToString());
        dictionary.Add("file_name", strPath);
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        dictionary.Add("account_id", myCharInfo.m_SN.ToString());
        GameObject gameObject = GameObject.Find("OmniataManager");

        if (gameObject)
        {
            OmniataComponent component = gameObject.GetComponent <OmniataComponent>();
            if (component)
            {
                component.Track("om_funnel_load", dictionary);
            }
        }
    }
Пример #6
0
    public void ShowLevelUpAlarm2()
    {
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        if (nrCharUser != null)
        {
            NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
            if (kMyCharInfo != null)
            {
                int level = kMyCharInfo.GetLevel();
                for (int i = this.startLevel + 1; i <= level; i++)
                {
                    if (this.dic_levelupInfo.ContainsKey(i))
                    {
                        LevelupInfoDLG levelupInfoDLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.LEVELUP_GUIDE_DLG) as LevelupInfoDLG;

                        levelupInfoDLG.Show(this.dic_levelupInfo[i]);
                    }
                }
                this.startLevel = kMyCharInfo.GetLevel();
                BookmarkDlg bookmarkDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BOOKMARK_DLG) as BookmarkDlg;

                if (bookmarkDlg != null)
                {
                    bookmarkDlg.UpdateBookmarkInfo(BookmarkDlg.TYPE.HERO);
                }
                HeroCollect_DLG heroCollect_DLG = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.HEROCOLLECT_DLG) as HeroCollect_DLG;

                if (heroCollect_DLG != null)
                {
                    heroCollect_DLG.Update_Notice();
                }
                Tapjoy.SetUserLevel(kMyCharInfo.GetLevel());
                string comment = string.Format("levelup{0}", kMyCharInfo.GetLevel());
                NrTSingleton <FiveRocksEventManager> .Instance.Placement(comment);

                eSERVICE_AREA currentServiceArea = NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea();

                if (currentServiceArea == eSERVICE_AREA.SERVICE_ANDROID_KORGOOGLE || currentServiceArea == eSERVICE_AREA.SERVICE_ANDROID_KORQA)
                {
                    NrTSingleton <AdWords> .Instance.LevelUp(kMyCharInfo.GetLevel());
                }
                DateTime dateTime  = DateTime.Now.ToLocalTime();
                DateTime arg_158_0 = dateTime;
                DateTime dateTime2 = new DateTime(1970, 1, 1, 0, 0, 0, 0);
                int      num       = (int)(arg_158_0 - dateTime2.ToLocalTime()).TotalSeconds;
                Dictionary <string, string> dictionary = new Dictionary <string, string>();
                dictionary.Add("ts", num.ToString());
                dictionary.Add("level", kMyCharInfo.GetLevel().ToString());
                dictionary.Add("account_id", kMyCharInfo.m_SN.ToString());
                GameObject pkGoOminiata = StageSystemCheck.pkGoOminiata;
                if (pkGoOminiata)
                {
                    OmniataComponent component = pkGoOminiata.GetComponent <OmniataComponent>();
                    if (component)
                    {
                        component.Track("om_level", dictionary);
                    }
                }
                if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel() >= 10 && PlayerPrefs.GetInt(NrPrefsKey.PLAYER_PLAYLOCKDEVICEID_SEND, 0) == 0)
                {
                    TsPlatform.Operator.GetPlayLockID();
                }
            }
            NrTSingleton <NkClientLogic> .Instance.ShowChangeGuestIDUI();
        }
    }