예제 #1
0
 public void DownloadStats()
 {
     if (_userIsReady)
     {
         UserStats.DownloadStats(DownloadStatsHandler);
     }
 }
 void TestIsReadyCallback(int errorCode)
 {
     if (errorCode == SUCCESS)
     {
         TestLogger.Success("IsReady", "IsReady success.");
         UserStats.DownloadStats(TestDownloadStatsCallback);
     }
     else
     {
         TestLogger.Error("IsReady", string.Format("IsReady failure. Error Code: {0}", errorCode));
     }
 }
예제 #3
0
    void OnGUI()
    {
        GUIStyle CustButton = new GUIStyle("button");

#if UNITY_ANDROID
        CustButton.fontSize = 23;
#endif
        if (bInit == false)
        {
            GUI.contentColor = Color.white;
        }
        else
        {
            GUI.contentColor = Color.grey;
        }

        // Init function
        if (GUI.Button(new Rect(nXStart, nYStart, nWidth, nHeight), "Init", CustButton))
        {
            if (bInit == false)
            {
                Api.Init(InitStatusHandler, APP_ID);
            }
        }

        if (bInit == true)
        {
            GUI.contentColor = Color.white;
        }
        else
        {
            GUI.contentColor = Color.grey;
        }

        // Shutdown function
        if (GUI.Button(new Rect((nXStart + 1 * (nWidth + 10)), nYStart, nWidth, nHeight), "Shutdown", CustButton))
        {
            if (bInit == true)
            {
                Api.Shutdown(ShutdownHandler);
            }
        }

        // Api Version function
        if (GUI.Button(new Rect((nXStart + 2 * (nWidth + 10)), nYStart, nWidth, nHeight), "Version", CustButton))
        {
            if (bInit == true)
            {
                Viveport.Core.Logger.Log("Version: " + Api.Version());
            }
        }

#if !UNITY_ANDROID
        // QueryRunMode function
        if (GUI.Button(new Rect((nXStart + 3 * (nWidth + 10)), nYStart, nWidth, nHeight), "QueryRunMode", CustButton))
        {
            if (bInit == true)
            {
                Api.QueryRuntimeMode(QueryRunTimeHandler);
            }
        }
#endif
        // IsReady function
        if (GUI.Button(new Rect((nXStart + 4 * (nWidth + 10)), nYStart, nWidth, nHeight), "StatIsReady", CustButton))
        {
            if (bInit == true)
            {
                UserStats.IsReady(IsReadyHandler);
            }
        }

        /***************************************************************************/
        /*                        DRM sample code                                  */
        /***************************************************************************/
        // DRM function
        if (GUI.Button(new Rect((nXStart + 6 * (nWidth + 10)), nYStart, nWidth, nHeight), "DRM", CustButton))
        {
            if (bInit == true)
            {
                Api.GetLicense(new MyLicenseChecker(), APP_ID, APP_KEY);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

#if !UNITY_ANDROID
        /***************************************************************************/
        /*                        ArcadeLeaderboard sample code                    */
        /***************************************************************************/
        // UserProfile function
        if (GUI.Button(new Rect((nXStart + 5 * (nWidth + 10)), nYStart, nWidth, nHeight), "ArcadeIsReady", CustButton))
        {
            if (bInit == true)
            {
                ArcadeLeaderboard.IsReady(IsArcadeLeaderboardReadyHandler);
            }
        }

        if (bInit == true && bIsReady == true)
        {
            GUI.contentColor = Color.white;
        }
        else
        {
            GUI.contentColor = Color.grey;
        }
#endif

        /***************************************************************************/
        /*                        User profile sample code                         */
        /***************************************************************************/
        // UserProfile function
        if (GUI.Button(new Rect((nXStart + 7 * (nWidth + 10)), nYStart, nWidth, nHeight), "UserProfile", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                Viveport.Core.Logger.Log("UserId: " + User.GetUserId());
                Viveport.Core.Logger.Log("userName: "******"userAvatarUrl: " + User.GetUserAvatarUrl());
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        /***************************************************************************/
        /*                          Stat sample code                               */
        /***************************************************************************/
        stringToEdit = GUI.TextField(new Rect(10, nWidth + 10, 120, 20), stringToEdit, 50);
        StatsCount   = GUI.TextField(new Rect(130, nWidth + 10, 220, 20), StatsCount, 50);

        // DownloadStat function
        if (GUI.Button(new Rect(nXStart, nYStart + nWidth + 10, nWidth, nHeight), "DownloadStat", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                UserStats.DownloadStats(DownloadStatsHandler);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // UploadStat function
        if (GUI.Button(new Rect((nXStart + 1 * (nWidth + 10)), nYStart + nWidth + 10, nWidth, nHeight), "UploadStat", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                UserStats.UploadStats(UploadStatsHandler);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // GetStat function
        if (GUI.Button(new Rect(nXStart + 2 * (nWidth + 10), nYStart + nWidth + 10, nWidth, nHeight), "GetStat", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                nResult = UserStats.GetStat(stringToEdit, nInitValue);
                Viveport.Core.Logger.Log("Get " + stringToEdit + " stat name as => " + nResult);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // SetStat function
        if (GUI.Button(new Rect(nXStart + 3 * (nWidth + 10), nYStart + nWidth + 10, nWidth, nHeight), "SetStat", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                Viveport.Core.Logger.Log("MaxStep is => " + int.Parse(StatsCount));
                nResult = int.Parse(StatsCount);
                UserStats.SetStat(stringToEdit, nResult);
                Viveport.Core.Logger.Log("Set" + stringToEdit + " stat name as =>" + nResult);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        /***************************************************************************/
        /*                          Achievement sample code                        */
        /***************************************************************************/

        achivToEdit = GUI.TextField(new Rect(10, 2 * nWidth + 15, 120, 20), achivToEdit, 50);

        // GetAchievement function
        if (GUI.Button(new Rect(nXStart, nYStart + 2 * nWidth + 10, nWidth, nHeight), "GetAchieve", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                bool bAchievement = false;
                bAchievement = UserStats.GetAchievement(achivToEdit);
                Viveport.Core.Logger.Log("Get achievement => " + achivToEdit + " , and value is => " + bAchievement);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // SetAchievement function
        if (GUI.Button(new Rect(nXStart + nWidth + 10, nYStart + 2 * nWidth + 10, nWidth, nHeight), "SetAchieve", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                UserStats.SetAchievement(achivToEdit);
                Viveport.Core.Logger.Log("Set achievement => " + achivToEdit);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // ClearAchievement function
        if (GUI.Button(new Rect(nXStart + 2 * (nWidth + 10), nYStart + 2 * nWidth + 10, nWidth, nHeight), "ClearAchieve", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                UserStats.ClearAchievement(achivToEdit);
                Viveport.Core.Logger.Log("Clear achievement => " + achivToEdit);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // GetAchievementUnlockTime function
        if (GUI.Button(new Rect(nXStart + 3 * (nWidth + 10), nYStart + 2 * nWidth + 10, nWidth, nHeight), "Achieve&Time", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                int nunlockTime = 0;
                nunlockTime = UserStats.GetAchievementUnlockTime(achivToEdit);
                Viveport.Core.Logger.Log("The achievement's unlock time is =>" + nunlockTime);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        /***************************************************************************/
        /*                          Leaderboard sample code                        */
        /***************************************************************************/

        leaderboardToEdit = GUI.TextField(new Rect(10, 3 * nWidth + 20, 160, 20), leaderboardToEdit, 150);

        // DownloadLeaderboardScores around user function
        if (GUI.Button(new Rect(nXStart, nYStart + 3 * nWidth + 20, nWidth, nHeight), "DL Around", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                UserStats.DownloadLeaderboardScores(DownloadLeaderboardHandler, leaderboardToEdit, UserStats.LeaderBoardRequestType.GlobalDataAroundUser, UserStats.LeaderBoardTimeRange.AllTime, -5, 5);
                Viveport.Core.Logger.Log("DownloadLeaderboardScores");
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // DownloadLeaderboardScores global data function
        if (GUI.Button(new Rect(nXStart + 1 * (nWidth + 10), nYStart + 3 * nWidth + 20, nWidth, nHeight), "DL not Around", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                UserStats.DownloadLeaderboardScores(DownloadLeaderboardHandler, leaderboardToEdit, UserStats.LeaderBoardRequestType.GlobalData, UserStats.LeaderBoardTimeRange.AllTime, 0, 10);
                Viveport.Core.Logger.Log("DownloadLeaderboardScores");
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        leaderboardScore = GUI.TextField(new Rect(10 + 160, 3 * nWidth + 20, 160, 20), leaderboardScore, 50);

        // UploadLeaderboardScore function
        if (GUI.Button(new Rect(nXStart + 2 * (nWidth + 10), nYStart + 3 * nWidth + 20, nWidth, nHeight), "Upload LB", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                UserStats.UploadLeaderboardScore(UploadLeaderboardScoreHandler, leaderboardToEdit, int.Parse(leaderboardScore));
                Viveport.Core.Logger.Log("UploadLeaderboardScore");
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // GetLeaderboardScoreCount function
        if (GUI.Button(new Rect(nXStart + 3 * (nWidth + 10), nYStart + 3 * nWidth + 20, nWidth, nHeight), "Get LB count", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                nResult = UserStats.GetLeaderboardScoreCount();
                Viveport.Core.Logger.Log("GetLeaderboardScoreCount=> " + nResult);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // GetLeaderboardScore function
        if (GUI.Button(new Rect(nXStart + 4 * (nWidth + 10), nYStart + 3 * nWidth + 20, nWidth, nHeight), "Get LB Score", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                int nResult = (int)UserStats.GetLeaderboardScoreCount();

                Viveport.Core.Logger.Log("GetLeaderboardScoreCount => " + nResult);

                for (int i = 0; i < nResult; i++)
                {
                    Viveport.Leaderboard lbdata;
                    lbdata = UserStats.GetLeaderboardScore(i);
                    Viveport.Core.Logger.Log("UserName = "******", Score = " + lbdata.Score + ", Rank = " + lbdata.Rank);
                }
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // GetLeaderboardSortMethod function
        if (GUI.Button(new Rect(nXStart + 5 * (nWidth + 10), nYStart + 3 * nWidth + 20, nWidth, nHeight), "Get Sort Method", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                int nResult = (int)UserStats.GetLeaderboardSortMethod();
                Viveport.Core.Logger.Log("GetLeaderboardSortMethod=> " + nResult);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // GetLeaderboardDisplayType function
        if (GUI.Button(new Rect(nXStart + 6 * (nWidth + 10), nYStart + 3 * nWidth + 20, nWidth, nHeight), "Get Disp Type", CustButton))
        {
            if (bInit == true && bIsReady == true)
            {
                int nResult = (int)UserStats.GetLeaderboardDisplayType();
                Viveport.Core.Logger.Log("GetLeaderboardDisplayType=> " + nResult);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

#if !UNITY_ANDROID
        /***************************************************************************/
        /*                         ArcadeLeaderboard sample code                   */
        /***************************************************************************/

        if (bInit == true && bArcadeIsReady == true)
        {
            GUI.contentColor = Color.white;
        }
        else
        {
            GUI.contentColor = Color.grey;
        }

        leaderboardToEdit = GUI.TextField(new Rect(10, 4 * nWidth + 20, 160, 20), leaderboardToEdit, 150);

        // DownloadLeaderboardScores function
        if (GUI.Button(new Rect(nXStart, nYStart + 4 * nWidth + 20, nWidth, nHeight), "DL Arca LB", CustButton))
        {
            if (bInit == true && bArcadeIsReady == true)
            {
                ArcadeLeaderboard.DownloadLeaderboardScores(DownloadLeaderboardHandler, leaderboardToEdit, ArcadeLeaderboard.LeaderboardTimeRange.AllTime, 10);
                Viveport.Core.Logger.Log("DownloadLeaderboardScores");
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        leaderboardUserName = GUI.TextField(new Rect(10 + 160, 4 * nWidth + 20, 160, 20), leaderboardUserName, 150);
        leaderboardScore    = GUI.TextField(new Rect(10 + 320, 4 * nWidth + 20, 160, 20), leaderboardScore, 50);

        // UploadLeaderboardScore function
        if (GUI.Button(new Rect(nXStart + 1 * (nWidth + 10), nYStart + 4 * nWidth + 20, nWidth, nHeight), "UL Arca LB", CustButton))
        {
            if (bInit == true && bArcadeIsReady == true)
            {
                ArcadeLeaderboard.UploadLeaderboardScore(UploadLeaderboardScoreHandler, leaderboardToEdit, leaderboardUserName, int.Parse(leaderboardScore));
                Viveport.Core.Logger.Log("UploadLeaderboardScore");
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // GetLeaderboardScoreCount function
        if (GUI.Button(new Rect(nXStart + 2 * (nWidth + 10), nYStart + 4 * nWidth + 20, nWidth, nHeight), "Get Arca Count", CustButton))
        {
            if (bInit == true && bArcadeIsReady == true)
            {
                nResult = ArcadeLeaderboard.GetLeaderboardScoreCount();
                Viveport.Core.Logger.Log("GetLeaderboardScoreCount=> " + nResult);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & Arcade isReady are successful.");
            }
        }

        // GetLeaderboardScore function
        if (GUI.Button(new Rect(nXStart + 3 * (nWidth + 10), nYStart + 4 * nWidth + 20, nWidth, nHeight), "Get Arca Score", CustButton))
        {
            if (bInit == true && bArcadeIsReady == true)
            {
                int nResult = (int)ArcadeLeaderboard.GetLeaderboardScoreCount();

                Viveport.Core.Logger.Log("GetLeaderboardScoreCount => " + nResult);

                for (int i = 0; i < nResult; i++)
                {
                    Viveport.Leaderboard lbdata;
                    lbdata = ArcadeLeaderboard.GetLeaderboardScore(i);
                    Viveport.Core.Logger.Log("UserName = "******", Score = " + lbdata.Score + ", Rank = " + lbdata.Rank);
                }
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // GetLeaderboardUserScore function
        if (GUI.Button(new Rect(nXStart + 4 * (nWidth + 10), nYStart + 4 * nWidth + 20, nWidth, nHeight), "Get AC UScore", CustButton))
        {
            if (bInit == true && bArcadeIsReady == true)
            {
                int nResult = (int)ArcadeLeaderboard.GetLeaderboardUserScore();
                Viveport.Core.Logger.Log("GetLeaderboardUserScore=> " + nResult);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }

        // GetLeaderboardUserRank function
        if (GUI.Button(new Rect(nXStart + 5 * (nWidth + 10), nYStart + 4 * nWidth + 20, nWidth, nHeight), "Get AC URank", CustButton))
        {
            if (bInit == true && bArcadeIsReady == true)
            {
                int nResult = (int)ArcadeLeaderboard.GetLeaderboardUserRank();
                Viveport.Core.Logger.Log("GetLeaderboardUserRank=> " + nResult);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
#endif
    }
예제 #4
0
    // Token: 0x06000E26 RID: 3622 RVA: 0x0005A314 File Offset: 0x00058514
    private void OnGUI()
    {
        GUIStyle style    = new GUIStyle("button");
        GUIStyle guistyle = new GUIStyle("button");

        guistyle.fontSize = 10;
        if (!ViveportDemo.bInit)
        {
            GUI.contentColor = Color.white;
        }
        else
        {
            GUI.contentColor = Color.grey;
        }
        if (GUI.Button(new Rect((float)this.nXStart, (float)this.nYStart, (float)this.nWidth, (float)this.nHeight), "Init", style) && !ViveportDemo.bInit)
        {
            Api.Init(new StatusCallback(ViveportDemo.InitStatusHandler), ViveportDemo.APP_ID);
        }
        if (ViveportDemo.bInit)
        {
            GUI.contentColor = Color.white;
        }
        else
        {
            GUI.contentColor = Color.grey;
        }
        if (GUI.Button(new Rect((float)(this.nXStart + (this.nWidth + 10)), (float)this.nYStart, (float)this.nWidth, (float)this.nHeight), "Shutdown", style) && ViveportDemo.bInit)
        {
            Api.Shutdown(new StatusCallback(ViveportDemo.ShutdownHandler));
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 2 * (this.nWidth + 10)), (float)this.nYStart, (float)this.nWidth, (float)this.nHeight), "Version", style) && ViveportDemo.bInit)
        {
            Viveport.Core.Logger.Log("Version: " + Api.Version());
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 3 * (this.nWidth + 10)), (float)this.nYStart, (float)this.nWidth, (float)this.nHeight), "QueryRunMode", style) && ViveportDemo.bInit)
        {
            Api.QueryRuntimeMode(new QueryRuntimeModeCallback(ViveportDemo.QueryRunTimeHandler));
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 4 * (this.nWidth + 10)), (float)this.nYStart, (float)this.nWidth, (float)this.nHeight), "StatIsReady", style) && ViveportDemo.bInit)
        {
            UserStats.IsReady(new StatusCallback(ViveportDemo.IsReadyHandler));
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 6 * (this.nWidth + 10)), (float)this.nYStart, (float)this.nWidth, (float)this.nHeight), "DRM", style))
        {
            if (ViveportDemo.bInit)
            {
                Api.GetLicense(new ViveportDemo.MyLicenseChecker(), ViveportDemo.APP_ID, ViveportDemo.APP_KEY);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 5 * (this.nWidth + 10)), (float)this.nYStart, (float)this.nWidth, (float)this.nHeight), "ArcadeIsReady", style) && ViveportDemo.bInit)
        {
            ArcadeLeaderboard.IsReady(new StatusCallback(ViveportDemo.IsArcadeLeaderboardReadyHandler));
        }
        if (ViveportDemo.bInit && ViveportDemo.bIsReady)
        {
            GUI.contentColor = Color.white;
        }
        else
        {
            GUI.contentColor = Color.grey;
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 7 * (this.nWidth + 10)), (float)this.nYStart, (float)this.nWidth, (float)this.nHeight), "UserProfileIsReady", guistyle))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                User.IsReady(new StatusCallback(ViveportDemo.UserProfileIsReadyHandler));
            }
            else
            {
                ViveportDemo.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 8 * (this.nWidth + 10)), (float)this.nYStart, (float)this.nWidth, (float)this.nHeight), "UserProfile", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady && ViveportDemo.bUserProfileIsReady)
            {
                ViveportDemo.Log("UserId: " + User.GetUserId());
                ViveportDemo.Log("userName: "******"userAvatarUrl: " + User.GetUserAvatarUrl());
            }
            else
            {
                ViveportDemo.Log("Please make sure init & isReady are successful.");
            }
        }
        this.stringToEdit = GUI.TextField(new Rect(10f, (float)(this.nWidth + 10), 120f, 20f), this.stringToEdit, 50);
        this.StatsCount   = GUI.TextField(new Rect(130f, (float)(this.nWidth + 10), 220f, 20f), this.StatsCount, 50);
        if (GUI.Button(new Rect((float)this.nXStart, (float)(this.nYStart + this.nWidth + 10), (float)this.nWidth, (float)this.nHeight), "DownloadStat", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                UserStats.DownloadStats(new StatusCallback(ViveportDemo.DownloadStatsHandler));
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + (this.nWidth + 10)), (float)(this.nYStart + this.nWidth + 10), (float)this.nWidth, (float)this.nHeight), "UploadStat", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                UserStats.UploadStats(new StatusCallback(ViveportDemo.UploadStatsHandler));
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 2 * (this.nWidth + 10)), (float)(this.nYStart + this.nWidth + 10), (float)this.nWidth, (float)this.nHeight), "GetStat", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                this.nResult = UserStats.GetStat(this.stringToEdit, this.nInitValue);
                Viveport.Core.Logger.Log(string.Concat(new object[]
                {
                    "Get ",
                    this.stringToEdit,
                    " stat name as => ",
                    this.nResult
                }));
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 3 * (this.nWidth + 10)), (float)(this.nYStart + this.nWidth + 10), (float)this.nWidth, (float)this.nHeight), "SetStat", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                Viveport.Core.Logger.Log("MaxStep is => " + int.Parse(this.StatsCount));
                this.nResult = int.Parse(this.StatsCount);
                UserStats.SetStat(this.stringToEdit, this.nResult);
                Viveport.Core.Logger.Log(string.Concat(new object[]
                {
                    "Set",
                    this.stringToEdit,
                    " stat name as =>",
                    this.nResult
                }));
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        this.achivToEdit = GUI.TextField(new Rect(10f, (float)(2 * this.nWidth + 15), 120f, 20f), this.achivToEdit, 50);
        if (GUI.Button(new Rect((float)this.nXStart, (float)(this.nYStart + 2 * this.nWidth + 10), (float)this.nWidth, (float)this.nHeight), "GetAchieve", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                bool achievement = UserStats.GetAchievement(this.achivToEdit);
                Viveport.Core.Logger.Log("Get achievement => " + this.achivToEdit + " , and value is => " + achievement.ToString());
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + this.nWidth + 10), (float)(this.nYStart + 2 * this.nWidth + 10), (float)this.nWidth, (float)this.nHeight), "SetAchieve", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                UserStats.SetAchievement(this.achivToEdit);
                Viveport.Core.Logger.Log("Set achievement => " + this.achivToEdit);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 2 * (this.nWidth + 10)), (float)(this.nYStart + 2 * this.nWidth + 10), (float)this.nWidth, (float)this.nHeight), "ClearAchieve", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                UserStats.ClearAchievement(this.achivToEdit);
                Viveport.Core.Logger.Log("Clear achievement => " + this.achivToEdit);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 3 * (this.nWidth + 10)), (float)(this.nYStart + 2 * this.nWidth + 10), (float)this.nWidth, (float)this.nHeight), "Achieve&Time", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                int achievementUnlockTime = UserStats.GetAchievementUnlockTime(this.achivToEdit);
                Viveport.Core.Logger.Log("The achievement's unlock time is =>" + achievementUnlockTime);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        this.leaderboardToEdit = GUI.TextField(new Rect(10f, (float)(3 * this.nWidth + 20), 160f, 20f), this.leaderboardToEdit, 150);
        if (GUI.Button(new Rect((float)this.nXStart, (float)(this.nYStart + 3 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "DL Around", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                UserStats.DownloadLeaderboardScores(new StatusCallback(ViveportDemo.DownloadLeaderboardHandler), this.leaderboardToEdit, UserStats.LeaderBoardRequestType.GlobalDataAroundUser, UserStats.LeaderBoardTimeRange.AllTime, -5, 5);
                Viveport.Core.Logger.Log("DownloadLeaderboardScores");
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + (this.nWidth + 10)), (float)(this.nYStart + 3 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "DL not Around", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                UserStats.DownloadLeaderboardScores(new StatusCallback(ViveportDemo.DownloadLeaderboardHandler), this.leaderboardToEdit, UserStats.LeaderBoardRequestType.GlobalData, UserStats.LeaderBoardTimeRange.AllTime, 0, 10);
                Viveport.Core.Logger.Log("DownloadLeaderboardScores");
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        this.leaderboardScore = GUI.TextField(new Rect(170f, (float)(3 * this.nWidth + 20), 160f, 20f), this.leaderboardScore, 50);
        if (GUI.Button(new Rect((float)(this.nXStart + 2 * (this.nWidth + 10)), (float)(this.nYStart + 3 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "Upload LB", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                UserStats.UploadLeaderboardScore(new StatusCallback(ViveportDemo.UploadLeaderboardScoreHandler), this.leaderboardToEdit, int.Parse(this.leaderboardScore));
                Viveport.Core.Logger.Log("UploadLeaderboardScore");
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 3 * (this.nWidth + 10)), (float)(this.nYStart + 3 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "Get LB count", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                this.nResult = UserStats.GetLeaderboardScoreCount();
                Viveport.Core.Logger.Log("GetLeaderboardScoreCount=> " + this.nResult);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 4 * (this.nWidth + 10)), (float)(this.nYStart + 3 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "Get LB Score", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                int leaderboardScoreCount = UserStats.GetLeaderboardScoreCount();
                Viveport.Core.Logger.Log("GetLeaderboardScoreCount => " + leaderboardScoreCount);
                for (int i = 0; i < leaderboardScoreCount; i++)
                {
                    Leaderboard leaderboard = UserStats.GetLeaderboardScore(i);
                    Viveport.Core.Logger.Log(string.Concat(new object[]
                    {
                        "UserName = "******", Score = ",
                        leaderboard.Score,
                        ", Rank = ",
                        leaderboard.Rank
                    }));
                }
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 5 * (this.nWidth + 10)), (float)(this.nYStart + 3 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "Get Sort Method", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                int leaderboardSortMethod = (int)UserStats.GetLeaderboardSortMethod();
                Viveport.Core.Logger.Log("GetLeaderboardSortMethod=> " + leaderboardSortMethod);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 6 * (this.nWidth + 10)), (float)(this.nYStart + 3 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "Get Disp Type", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bIsReady)
            {
                int leaderboardDisplayType = (int)UserStats.GetLeaderboardDisplayType();
                Viveport.Core.Logger.Log("GetLeaderboardDisplayType=> " + leaderboardDisplayType);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (ViveportDemo.bInit && ViveportDemo.bArcadeIsReady)
        {
            GUI.contentColor = Color.white;
        }
        else
        {
            GUI.contentColor = Color.grey;
        }
        this.leaderboardToEdit = GUI.TextField(new Rect(10f, (float)(4 * this.nWidth + 20), 160f, 20f), this.leaderboardToEdit, 150);
        if (GUI.Button(new Rect((float)this.nXStart, (float)(this.nYStart + 4 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "DL Arca LB", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bArcadeIsReady)
            {
                ArcadeLeaderboard.DownloadLeaderboardScores(new StatusCallback(ViveportDemo.DownloadLeaderboardHandler), this.leaderboardToEdit, ArcadeLeaderboard.LeaderboardTimeRange.AllTime, 10);
                Viveport.Core.Logger.Log("DownloadLeaderboardScores");
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        this.leaderboardUserName = GUI.TextField(new Rect(170f, (float)(4 * this.nWidth + 20), 160f, 20f), this.leaderboardUserName, 150);
        this.leaderboardScore    = GUI.TextField(new Rect(330f, (float)(4 * this.nWidth + 20), 160f, 20f), this.leaderboardScore, 50);
        if (GUI.Button(new Rect((float)(this.nXStart + (this.nWidth + 10)), (float)(this.nYStart + 4 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "UL Arca LB", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bArcadeIsReady)
            {
                ArcadeLeaderboard.UploadLeaderboardScore(new StatusCallback(ViveportDemo.UploadLeaderboardScoreHandler), this.leaderboardToEdit, this.leaderboardUserName, int.Parse(this.leaderboardScore));
                Viveport.Core.Logger.Log("UploadLeaderboardScore");
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 2 * (this.nWidth + 10)), (float)(this.nYStart + 4 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "Get Arca Count", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bArcadeIsReady)
            {
                this.nResult = ArcadeLeaderboard.GetLeaderboardScoreCount();
                Viveport.Core.Logger.Log("GetLeaderboardScoreCount=> " + this.nResult);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & Arcade isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 3 * (this.nWidth + 10)), (float)(this.nYStart + 4 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "Get Arca Score", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bArcadeIsReady)
            {
                int leaderboardScoreCount2 = ArcadeLeaderboard.GetLeaderboardScoreCount();
                Viveport.Core.Logger.Log("GetLeaderboardScoreCount => " + leaderboardScoreCount2);
                for (int j = 0; j < leaderboardScoreCount2; j++)
                {
                    Leaderboard leaderboard2 = ArcadeLeaderboard.GetLeaderboardScore(j);
                    Viveport.Core.Logger.Log(string.Concat(new object[]
                    {
                        "UserName = "******", Score = ",
                        leaderboard2.Score,
                        ", Rank = ",
                        leaderboard2.Rank
                    }));
                }
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 4 * (this.nWidth + 10)), (float)(this.nYStart + 4 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "Get AC UScore", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bArcadeIsReady)
            {
                int leaderboardUserScore = ArcadeLeaderboard.GetLeaderboardUserScore();
                Viveport.Core.Logger.Log("GetLeaderboardUserScore=> " + leaderboardUserScore);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (GUI.Button(new Rect((float)(this.nXStart + 5 * (this.nWidth + 10)), (float)(this.nYStart + 4 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "Get AC URank", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bArcadeIsReady)
            {
                int leaderboardUserRank = ArcadeLeaderboard.GetLeaderboardUserRank();
                Viveport.Core.Logger.Log("GetLeaderboardUserRank=> " + leaderboardUserRank);
            }
            else
            {
                Viveport.Core.Logger.Log("Please make sure init & isReady are successful.");
            }
        }
        if (ViveportDemo.bInit)
        {
            GUI.contentColor = Color.white;
        }
        else
        {
            GUI.contentColor = Color.grey;
        }
        if (GUI.Button(new Rect((float)this.nXStart, (float)(this.nYStart + 5 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "TokenIsReady", style) && ViveportDemo.bInit)
        {
            Token.IsReady(new StatusCallback(ViveportDemo.IsTokenReadyHandler));
        }
        if (ViveportDemo.bInit && ViveportDemo.bTokenIsReady)
        {
            GUI.contentColor = Color.white;
        }
        else
        {
            GUI.contentColor = Color.grey;
        }
        if (GUI.Button(new Rect((float)(this.nXStart + (this.nWidth + 10)), (float)(this.nYStart + 5 * this.nWidth + 20), (float)this.nWidth, (float)this.nHeight), "SessionToken", style))
        {
            if (ViveportDemo.bInit && ViveportDemo.bTokenIsReady)
            {
                Token.GetSessionToken(new StatusCallback2(ViveportDemo.GetSessionTokenHandler));
                return;
            }
            Viveport.Core.Logger.Log("Please make sure init & tokenIsReady are successful.");
        }
    }