// Token: 0x06000E2A RID: 3626 RVA: 0x0005B628 File Offset: 0x00059828 private static void UserProfileIsReadyHandler(int nResult) { if (nResult == 0) { ViveportDemo.bUserProfileIsReady = true; ViveportDemo.Log("UserProfileIsReadyHandler is successful"); return; } ViveportDemo.bUserProfileIsReady = false; ViveportDemo.Log("UserProfileIsReadyHandler error: " + nResult); }
// 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."); } }