void Update() { if (usingSetting) { return; } if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow)) { selected.Selected = false; selected = selected.NavTop; selected.Select(); } else if (Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.DownArrow)) { selected.Selected = false; selected = selected.NavBottom; selected.Select(); } else if (Input.GetButtonDown("Submit")) { selected.Activate(); } }
private void Update() { if (GameManager.ins.GamePaused) { return; } if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow)) { if (selected.NavTop == null) { return; } selected.Selected = false; selected = selected.NavTop; selected.Select(); } else if (Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.DownArrow)) { if (selected.NavBottom == null) { return; } selected.Selected = false; selected = selected.NavBottom; selected.Select(); } else if (Input.GetKeyDown(KeyCode.Space)) { if (!selected.Disabled && !selected.Active && boss.Idling) { selected.Activate(); } } else if (Input.GetKeyDown(KeyCode.Alpha1) || Input.GetKeyDown(KeyCode.Keypad1)) { PressSortKey(1); } else if (Input.GetKeyDown(KeyCode.Alpha2) || Input.GetKeyDown(KeyCode.Keypad2)) { PressSortKey(2); } else if (Input.GetKeyDown(KeyCode.Alpha3) || Input.GetKeyDown(KeyCode.Keypad3)) { PressSortKey(3); } else if (Input.GetKeyDown(KeyCode.Alpha4) || Input.GetKeyDown(KeyCode.Keypad4)) { PressSortKey(4); } else if (Input.GetKeyDown(KeyCode.Alpha5) || Input.GetKeyDown(KeyCode.Keypad5)) { PressSortKey(5); } else if (Input.GetKeyDown(KeyCode.Alpha6) || Input.GetKeyDown(KeyCode.Keypad6)) { PressSortKey(6); } if (!boss.Idling) { float horizontal = Input.GetAxisRaw("Horizontal"); if (horizontal > 0.5f) { boss.Left(); } else if (horizontal < -0.5f) { boss.Right(); } // if (Mathf.Abs(horizontal) > 0.5f) {} // boss.keyDirection = horizontal > 0? -1: 1; } }