示例#1
0
        private void RpcClientRespawn()
        {
            try
            {
                //Enable game objects
                foreach (GameObject toEnable in disableGameObjectsOnDeath)
                {
                    toEnable.SetActive(true);
                }

                //Enable movement
                characterController.enabled   = true;
                playerMovementManager.enabled = true;

                //Enable the collider, or the Char controller
                if (isLocalPlayer)
                {
                    //Switch cams
                    GameManager.GetActiveSceneCamera().SetActive(false);

                    //Enable our HUD
                    uiManager.SetHud(true);
                }

                playerMovementManager.EnableStateHandling();
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "Something went wrong in {MethodName}!", nameof(RpcClientRespawn));
            }
        }