Пример #1
0
 public static void OnPlayerJoining()
 {
     if (!IsPlayerJoining)
     {
         IsPlayerJoining             = true;
         GameMain.isFullscreenPaused = true;
         InGamePopup.ShowInfo("Loading", "Player joining the game, please wait", null);
     }
 }
Пример #2
0
        public static void SetReady()
        {
            if (!IsMasterClient)
            {
                // Notify the server that we are done with loading the game
                networkProvider.SendPacket(new SyncComplete());
                InGamePopup.FadeOut();
            }

            // Finally we add the local player components to the player character
            GameMain.mainPlayer.gameObject.AddComponentIfMissing <LocalPlayerMovement>();
            GameMain.mainPlayer.gameObject.AddComponentIfMissing <LocalPlayerAnimation>();
        }
Пример #3
0
        public static void SetReady()
        {
            if (!IsMasterClient)
            {
                // Notify the server that we are done with loading the game
                networkProvider.SendPacket(new SyncComplete());
                InGamePopup.FadeOut();
            }

            // Finally we add the local player components to the player character
            GameMain.mainPlayer.gameObject.AddComponentIfMissing <LocalPlayerMovement>();
            GameMain.mainPlayer.gameObject.AddComponentIfMissing <LocalPlayerAnimation>();

            if (!IsMasterClient)
            {
                //Subscribe for the local star events
                LocalPlayer.SendPacket(new PlayerUpdateLocalStarId(GameMain.data.localStar.id));
                PatchLocks["GalacticTransport"] = false; // after inital sync we need to set this back to false
            }
        }
Пример #4
0
 public static void OnAllPlayersSyncCompleted()
 {
     IsPlayerJoining = false;
     InGamePopup.FadeOut();
     GameMain.isFullscreenPaused = false;
 }