예제 #1
0
 private void LoadData()
 {
     //레벨 세팅
     this.playerLevel = PlayerPrefs.GetInt("PlayerLv");
     Tapjoy.SetUserLevel(this.playerLevel);
     if (PlayerPrefs.GetString("PlayerExp") != "")
     {
         this.currentExp = double.Parse(PlayerPrefs.GetString("PlayerExp"));
     }
     if (this.playerLevel == 0)
     {
         this.playerLevel = 1;
         this.currentExp  = 0.0d;
     }
     //티어 세팅
     this.currentTierIdx = PlayerPrefs.GetInt("PlayerLoadTier");
     this.currentTier    = GameDatabase.instance.TierDataes[this.currentTierIdx];
     //
     this.isLoaded = true;
 }
예제 #2
0
    void OnGUI()
    {
        Rect  position;
        float yPosition = startY;

        if (inputStyle == null)
        {
            inputStyle          = GUI.skin.textField;
            inputStyle.fontSize = fontSize;
        }

        // User id
        position = new Rect(startX, yPosition, labelWidth, buttonHeight);
        GUI.Label(position, "User Id:", labelStyle);

        position    = new Rect(startX + labelWidth, yPosition, inputWidth, buttonHeight);
        inputUserId = GUI.TextField(position, inputUserId, 30, inputStyle);

        yPosition += yPadding;

        // User Level
        position = new Rect(startX, yPosition, inputWidth, buttonHeight);
        GUI.Label(position, "User Level:", labelStyle);

        position       = new Rect(startX + labelWidth, yPosition, inputWidth, buttonHeight);
        inputUserLevel = GUI.TextField(position, "" + inputUserLevel, 30, inputStyle);

        yPosition += yPadding;

        // User Friends
        position = new Rect(startX, yPosition, inputWidth, buttonHeight);
        GUI.Label(position, "User Friends:", labelStyle);

        position         = new Rect(startX + labelWidth, yPosition, inputWidth, buttonHeight);
        inputUserFriends = GUI.TextField(position, "" + inputUserFriends, 30, inputStyle);

        yPosition += yPadding;

        // User Cohorts Header
        position = new Rect(startX, yPosition, inputWidth, buttonHeight);
        GUI.Label(position, "User Cohorts:", headerStyle);
        yPosition += yPadding;

        // User Cohorts
        for (int i = 0; i < 5; i++)
        {
            position = new Rect(startX, yPosition, inputWidth, buttonHeight);
            GUI.Label(position, "  Cohort " + (i + 1) + ":", labelStyle);

            position        = new Rect(startX + labelWidth, yPosition, inputWidth, buttonHeight);
            cohortValues[i] = GUI.TextField(position, "" + cohortValues[i], 30, inputStyle);

            yPosition += yPadding;
        }

        yPosition += yPadding;

        position = new Rect(centerX - buttonWidth - buttonPadding, yPosition, buttonWidth, buttonHeight);
        if (GUI.Button(position, "Set"))
        {
            // Set user info
            Tapjoy.SetUserID(inputUserId);

            int temp = 0;
            if (int.TryParse(inputUserLevel, out temp))
            {
                Tapjoy.SetUserLevel(temp);
            }

            if (int.TryParse(inputUserFriends, out temp))
            {
                Tapjoy.SetUserFriendCount(temp);
            }

            // Set User cohorts
            for (int i = 0; i < cohortValues.Length; i++)
            {
                Tapjoy.SetUserCohortVariable(i + 1, cohortValues[i]);
            }
        }

        position = new Rect(centerX + buttonPadding, yPosition, buttonWidth, buttonHeight);
        if (GUI.Button(position, "Clear"))
        {
            inputUserId      = inputUserIdPlaceholder;
            inputUserLevel   = inputUserLevelPlaceholder;
            inputUserFriends = inputUserFriendsPlaceholder;
            cohortValues     = new string[5];
        }

        yPosition += yPadding;

        position = new Rect(startX, yPosition, inputWidth, buttonHeight);
        GUI.Label(position, "User Tag:", labelStyle);

        position = new Rect(startX + labelWidth, yPosition, inputWidth, buttonHeight);
        userTag  = GUI.TextField(position, "" + userTag, 30, inputStyle);

        yPosition += yPadding;

        position = new Rect(centerX - buttonWidth - buttonPadding, yPosition, buttonWidth * 2 / 3, buttonHeight);
        if (GUI.Button(position, "Add"))
        {
            Tapjoy.AddUserTag(userTag);
            userTag = "";
        }
        position = new Rect(centerX - buttonWidth / 3, yPosition, buttonWidth * 2 / 3, buttonHeight);
        if (GUI.Button(position, "Remove"))
        {
            Tapjoy.RemoveUserTag(userTag);
            userTag = "";
        }
        position = new Rect(centerX + buttonWidth / 3 + buttonPadding, yPosition, buttonWidth * 2 / 3, buttonHeight);
        if (GUI.Button(position, "Clear"))
        {
            Tapjoy.ClearUserTags();
            userTag = "";
        }

        yPosition += yPadding;
    }
예제 #3
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();
        }
    }