コード例 #1
0
 public void GameServicesUserIdCallback(string userId)
 {
     GameServicesManager.ToggleIdleTimerAndSounds(true);
     GameServicesManager.isWindowOpen = false;
     if (GameServicesManager.mGameServicesHelper != null)
     {
         GameServicesManager.mGameServicesHelper.HandleUserIdCallback(userId);
     }
 }
コード例 #2
0
 private void HandleApplicationPause(bool paused)
 {
     if (paused)
     {
         return;
     }
     if (GameServicesManager.isWindowOpen)
     {
         GameServicesManager.isWindowOpen = false;
         GameServicesManager.ToggleIdleTimerAndSounds(true);
     }
 }
コード例 #3
0
        public static void Startup()
        {
            GameObject gameObject = GameObject.Find("Game Services Manager");

            if (gameObject == null)
            {
                Service.Get <StaRTSLogger>().Error("Unable to find Game Services Manager object");
                return;
            }
            GameServicesManager component = gameObject.GetComponent <GameServicesManager>();

            if (component == null)
            {
                Service.Get <StaRTSLogger>().Error("Missing GameServicesManager component");
                return;
            }
            component.enabled = true;
            GameServicesManager.Init();
            Service.Get <EventManager>().RegisterObserver(component, EventId.ApplicationPauseToggled, EventPriority.AfterDefault);
        }
コード例 #4
0
 public unsafe static long $Invoke16(long instance, long *args)
 {
     GameServicesManager.ShowLeaderboard(Marshal.PtrToStringUni(*(IntPtr *)args));
     return(-1L);
 }
コード例 #5
0
 public unsafe static long $Invoke15(long instance, long *args)
 {
     GameServicesManager.ShowAchievements();
     return(-1L);
 }
コード例 #6
0
 public unsafe static long $Invoke14(long instance, long *args)
 {
     GameServicesManager.Share(Marshal.PtrToStringUni(*(IntPtr *)args), Marshal.PtrToStringUni(*(IntPtr *)(args + 1)), Marshal.PtrToStringUni(*(IntPtr *)(args + 2)));
     return(-1L);
 }
コード例 #7
0
 public unsafe static long $Invoke13(long instance, long *args)
 {
     GameServicesManager.OnReady();
     return(-1L);
 }
コード例 #8
0
 public static void ShowAchievements()
 {
     GameServicesManager.ToggleIdleTimerAndSounds(false);
     GameServicesManager.isWindowOpen = true;
     GameServicesManager.mGameServicesHelper.ShowAchievements();
 }
コード例 #9
0
 public unsafe static long $Invoke27(long instance, long *args)
 {
     GameServicesManager.UnlockAchievement(Marshal.PtrToStringUni(*(IntPtr *)args));
     return(-1L);
 }
コード例 #10
0
 public unsafe static long $Invoke20(long instance, long *args)
 {
     GameServicesManager.StaticReset();
     return(-1L);
 }
コード例 #11
0
 public unsafe static long $Invoke1(long instance, long *args)
 {
     GameServicesManager.AttemptAutomaticSignInPrompt();
     return(-1L);
 }
コード例 #12
0
 public unsafe static long $Invoke0(long instance, long *args)
 {
     GameServicesManager.AddScoreToLeaderboard(*(int *)args, Marshal.PtrToStringUni(*(IntPtr *)(args + 1)));
     return(-1L);
 }
コード例 #13
0
 public static void Share(string text, string contentURL, string thumbnailURL)
 {
     GameServicesManager.ToggleIdleTimerAndSounds(false);
     GameServicesManager.isWindowOpen = true;
     GameServicesManager.mGameServicesHelper.Share(text, contentURL, thumbnailURL);
 }
コード例 #14
0
 public static void ShowLeaderboard(string leaderboardId)
 {
     GameServicesManager.ToggleIdleTimerAndSounds(false);
     GameServicesManager.isWindowOpen = true;
     GameServicesManager.mGameServicesHelper.ShowLeaderboard(leaderboardId);
 }
コード例 #15
0
 public unsafe static long $Invoke18(long instance, long *args)
 {
     GameServicesManager.SignOut();
     return(-1L);
 }
コード例 #16
0
 public unsafe static long $Invoke19(long instance, long *args)
 {
     GameServicesManager.Startup();
     return(-1L);
 }
コード例 #17
0
 public unsafe static long $Invoke6(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(GameServicesManager.GetExternalNetworkCode()));
 }
コード例 #18
0
 public unsafe static long $Invoke21(long instance, long *args)
 {
     GameServicesManager.ToggleIdleTimerAndSounds(*(sbyte *)args != 0);
     return(-1L);
 }
コード例 #19
0
 public unsafe static long $Invoke8(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(GameServicesManager.GetUserId()));
 }
コード例 #20
0
 public unsafe static long $Invoke11(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(GameServicesManager.IsUserAuthenticated()));
 }
コード例 #21
0
 public static void SignIn()
 {
     GameServicesManager.ToggleIdleTimerAndSounds(false);
     GameServicesManager.isWindowOpen = true;
     GameServicesManager.mGameServicesHelper.SignIn();
 }