예제 #1
0
    void Start()
    {
        OnHealthUpdate(); // on start call function
        bool IsShowing = popup.gameObject.activeSelf;

        levelEnding.gameObject.SetActive(false);
        popup.gameObject.SetActive(false);
        popup.Refresh();
    }
예제 #2
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.M))
        {
            bool isShowing = settingsPopup.gameObject.activeSelf;
            settingsPopup.gameObject.SetActive(!isShowing);

            if (isShowing)
            {
                // Cursor.lockState = CursorLockMode.Locked;
                // Cursor.visible = false;
            }
            else
            {
                // Cursor.lockState = CursorLockMode.None;
                // Cursor.visible = true;
            }
        }
        if (Input.GetKeyDown(KeyCode.I))
        {
            bool isShowing = inventoryPopup.gameObject.activeSelf;
            inventoryPopup.gameObject.SetActive(!isShowing);
            inventoryPopup.Refresh();
        }
    }
예제 #3
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.M))
     {
         popup.gameObject.SetActive(!popup.gameObject.activeSelf);
         popup.Refresh();
     }
 }
예제 #4
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.M))
     {
         bool isShowing = popup.gameObject.activeSelf;
         popup.gameObject.SetActive(!isShowing);
         popup.Refresh();
     }
 }
예제 #5
0
        private void Update()
        {
            if (!Input.GetKeyDown(KeyCode.M))
            {
                return;
            }
            var isShowing = inventoryPopup.gameObject.activeSelf;

            inventoryPopup.gameObject.SetActive(!isShowing);
            inventoryPopup.Refresh();
        }
예제 #6
0
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.M))
        {
            bool isShowing = settingsPopup.gameObject.activeSelf;
            settingsPopup.gameObject.SetActive(!isShowing);
        }

        if (Input.GetKeyDown(KeyCode.I))
        {
            bool isShowing = inventoryPopup.gameObject.activeSelf;
            inventoryPopup.gameObject.SetActive(!isShowing);
            inventoryPopup.Refresh();
        }
    }
예제 #7
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.I))
        {
            bool isShowingInventory = i_popup.gameObject.activeSelf;
            i_popup.gameObject.SetActive(!isShowingInventory);
            i_popup.Refresh();
        }

        // Вызываем и скрываем всплывающее окно при помощи клавиши M.
        if (Input.GetKeyDown(KeyCode.S))
        {
            bool isShowing = s_popup.gameObject.activeSelf;
            s_popup.gameObject.SetActive(!isShowing);
        }
    }
예제 #8
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.M))
        {
            bool isShowing = popup.gameObject.activeSelf;
            popup.gameObject.SetActive(!isShowing);
            popup.Refresh();
        }
        if (Input.GetKeyDown(KeyCode.N))
        {
            bool isShowing = settingsPopup.gameObject.activeSelf;
            settingsPopup.gameObject.SetActive(!isShowing);

            /*if (isShowing) {
             *  Cursor.lockState = CursorLockMode.Locked;
             *  Cursor.visible = false;
             * } else {
             *  Cursor.lockState = CursorLockMode.None;
             *  Cursor.visible = true;
             * }*/
        }
    }
예제 #9
0
    public void Update()
    {
        if (Input.GetKeyDown(KeyCode.M))
        {
            // bool isShowing = settingsPopup.gameObject.activeSelf;
            // settingsPopup.gameObject.SetActive(!isShowing);
            bool isShowing = popup.gameObject.activeSelf;
            popup.gameObject.SetActive(!isShowing);
            popup.Refresh();

            /* //Used for fps controls
             * if(isShowing)
             * {
             *  Cursor.lockState = CursorLockMode.Locked;
             *  Cursor.visible = false;
             * }
             * else
             * {
             *  Cursor.lockState = CursorLockMode.None;
             *  Cursor.visible = true;
             * }
             */
        }
    }
예제 #10
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.M))
     {
         bool isShowing = popup.gameObject.activeSelf;
         popup.gameObject.SetActive(!isShowing);
         popup.Refresh();
     }
     if (Input.GetKeyDown(KeyCode.N))
     {
         bool isShowing = audioPopup.gameObject.activeSelf;
         audioPopup.gameObject.SetActive(!isShowing);
         //if (isShowing)
         //{
         //    Cursor.lockState = CursorLockMode.Locked;
         //    Cursor.visible = false;
         //}
         //else
         //{
         //    Cursor.lockState = CursorLockMode.None;
         //    Cursor.visible = true;
         //}
     }
 }
예제 #11
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.M))
     {
         bool isShowing = !popup.gameObject.activeSelf;
         if (isShowing)
         {
             if (inventoryPopup.gameObject.activeSelf)
             {
                 inventoryPopup.gameObject.SetActive(!isShowing);
             }
             if (mainMenuPopup.gameObject.activeSelf)
             {
                 mainMenuPopup.gameObject.SetActive(!isShowing);
             }
             Time.timeScale = 0f;
             PauseGame      = true;
         }
         else
         {
             Time.timeScale = 1f;
             PauseGame      = false;
         }
         popup.gameObject.SetActive(isShowing);
     }
     if (Input.GetKeyDown(KeyCode.I))
     {
         bool isShowing = !inventoryPopup.gameObject.activeSelf;
         if (isShowing)
         {
             if (popup.gameObject.activeSelf)
             {
                 popup.gameObject.SetActive(!isShowing);
             }
             if (mainMenuPopup.gameObject.activeSelf)
             {
                 mainMenuPopup.gameObject.SetActive(!isShowing);
             }
             inventoryPopup.Refresh();
             Time.timeScale = 0f;
             PauseGame      = true;
         }
         else
         {
             Time.timeScale = 1f;
             PauseGame      = false;
         }
         inventoryPopup.gameObject.SetActive(isShowing);
     }
     if (Input.GetKeyDown(KeyCode.P))
     {
         bool isShowing = !mainMenuPopup.gameObject.activeSelf;
         if (isShowing)
         {
             if (inventoryPopup.gameObject.activeSelf)
             {
                 inventoryPopup.gameObject.SetActive(!isShowing);
             }
             if (popup.gameObject.activeSelf)
             {
                 popup.gameObject.SetActive(!isShowing);
             }
             Time.timeScale = 0f;
             PauseGame      = true;
         }
         else
         {
             Time.timeScale = 1f;
             PauseGame      = false;
         }
         mainMenuPopup.gameObject.SetActive(isShowing);
     }
     if (TPSCamera.Mode2D)
     {
         CameraModeHelpText.text = "You can jump only in 3D mode. \n" +
                                   "Press \"Q\" to switch to 3D mode";
     }
     else if (!TPSCamera.Mode2D)
     {
         CameraModeHelpText.text = "Press \"Q\" to switch to 2D mode";
     }
 }