Example #1
0
        /// <summary>
        /// Update multiplayer state.
        /// </summary>
        void Update()
        {
            Utils.CallSafe("Update", () => {
                Steamworks.SteamAPI.RunCallbacks();

                if (IsInvitePanelVisible())
                {
                    UpdateFriendList();
                }

                gameWorld.Update();
                netManager.Update();


                // Development stuff.
#if !PUBLIC_RELEASE
                devTools.Update();

                if (localPlayer == null)
                {
                    localPlayer = GameObject.Find("PLAYER");
                }
                else
                {
                    devTools.UpdatePlayer(localPlayer);
                }
#endif
            });
        }
Example #2
0
        /// <summary>
        /// Update multiplayer state.
        /// </summary>
        void LateUpdate()
        {
            Utils.CallSafe("Update", () => {
                Steamworks.SteamAPI.RunCallbacks();

                if (IsInvitePanelVisible())
                {
                    UpdateFriendList();
                }

                gameWorld.Update();
                netManager.Update();

                // Development stuff.
#if !PUBLIC_RELEASE
                DevTools.Update();
#endif
            });
        }