private void PauseToggled() { // Activate player controller if the player is alive and the escape menu is not activated and the game has not yet finished. if (!IsDead && !GameManager.Singleton.GameFinished) { m_playerController.enabled = !EscapeMenu.IsActive(); } }
protected override void Respawn(Vector2Int respawnPoint) { if (isLocalPlayer) { GameOverMenu.Deactivate(); // Activate player controller if the escape menu is not activated if (!EscapeMenu.IsActive()) { m_playerController.enabled = true; } m_aim.CanAim = true; } base.Respawn(respawnPoint); }
private new void FixedUpdate() { if (!isLocalPlayer) { return; } base.FixedUpdate(); Cursor.visible = GameOverMenu.IsActive() || EscapeMenu.IsActive(); m_hud.UpdateHUD(); if (GameManager.Singleton.GameFinished && GameOverMenu.IsActive()) { GameOverMenu.Deactivate(); } }