private void Update() { if (m_started && m_Grounded && PMR_InputManager.PressedJumpButton()) { m_Grounded = false; Jump(); } }
/// <summary> /// Just event system and change difficulty stuff /// </summary> private void Update() { if (m_state == MENU_STATE.PRESS_START) { if (PMR_InputManager.PressedSkipButton()) { m_state = MENU_STATE.MAIN; m_eventSystem.SetSelectedGameObject(m_newGameText.transform.parent.gameObject); ShowMainAnimation(); } } else if (m_state == MENU_STATE.MAIN) { if (m_eventSystem.currentSelectedGameObject == null && (Input.GetKeyDown(KeyCode.DownArrow) || Input.GetKeyDown(KeyCode.UpArrow))) { m_eventSystem.SetSelectedGameObject(m_newGameText.transform.parent.gameObject); } if (Input.GetKeyDown(KeyCode.Keypad1) && PMR_GameManager.Instance.Difficulty != DIFICULTY.EASY) { PMR_GameManager.Instance.ChangeDifficulty(DIFICULTY.EASY); m_difficultyText.text = PMR_TextManager.GetText(PMR_TextSetup.Menu.DIFFICULTY) + PMR_TextManager.GetText(PMR_GameManager.Instance.Difficulty.ToString()); } if (Input.GetKeyDown(KeyCode.Keypad2) && PMR_GameManager.Instance.Difficulty != DIFICULTY.MID) { PMR_GameManager.Instance.ChangeDifficulty(DIFICULTY.MID); m_difficultyText.text = PMR_TextManager.GetText(PMR_TextSetup.Menu.DIFFICULTY) + PMR_TextManager.GetText(PMR_GameManager.Instance.Difficulty.ToString()); } if (Input.GetKeyDown(KeyCode.Keypad3) && PMR_GameManager.Instance.Difficulty != DIFICULTY.DIFFICULT) { PMR_GameManager.Instance.ChangeDifficulty(DIFICULTY.DIFFICULT); m_difficultyText.text = PMR_TextManager.GetText(PMR_TextSetup.Menu.DIFFICULTY) + PMR_TextManager.GetText(PMR_GameManager.Instance.Difficulty.ToString()); } } }