コード例 #1
0
 public void Login()
 {
     if (!OCBridge.IsGameCenterAvailable())
     {
         return;
     }
     Social.localUser.Authenticate(HandleAuthenticated);
 }
コード例 #2
0
 public void UpdateReportProgress(string achieveId, int score, int totalScore)
 {
     if (!OCBridge.IsGameCenterAvailable())
     {
         return;
     }
     if (Social.localUser.authenticated)
     {
         Social.ReportProgress(achieveId, (double)score / (double)totalScore * 100, HandleProgressReported);
     }
 }
コード例 #3
0
 public void UpdateScore(int score)
 {
     if (!OCBridge.IsGameCenterAvailable())
     {
         return;
     }
     if (Social.localUser.authenticated)
     {
         Social.ReportScore(score, GameCenterKey.LadderId, HandleScoreReported);
     }
 }
コード例 #4
0
 public void ShowGameCenter()
 {
     if (!OCBridge.IsGameCenterAvailable())
     {
         return;
     }
     if (isGameCenterSuccess && Social.localUser.authenticated)
     {
         Social.ShowAchievementsUI();
     }
 }
コード例 #5
0
 public bool IsGameCenterOK()
 {
     return(_socialMgr.isGameCenterSuccess && OCBridge.IsGameCenterAvailable());
 }