Ejemplo n.º 1
0
 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();
     }
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
    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();
        }
    }