void Start() { OnHealthUpdate(); // on start call function bool IsShowing = popup.gameObject.activeSelf; levelEnding.gameObject.SetActive(false); popup.gameObject.SetActive(false); popup.Refresh(); }
// 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(); } }
void Update() { if (Input.GetKeyDown(KeyCode.M)) { popup.gameObject.SetActive(!popup.gameObject.activeSelf); popup.Refresh(); } }
void Update() { if (Input.GetKeyDown(KeyCode.M)) { bool isShowing = popup.gameObject.activeSelf; popup.gameObject.SetActive(!isShowing); popup.Refresh(); } }
private void Update() { if (!Input.GetKeyDown(KeyCode.M)) { return; } var isShowing = inventoryPopup.gameObject.activeSelf; inventoryPopup.gameObject.SetActive(!isShowing); inventoryPopup.Refresh(); }
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(); } }
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); } }
// 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; * }*/ } }
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; * } */ } }
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; //} } }
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"; } }