private void Update() { HorizontalAxis = Input.GetAxis("Horizontal"); if (Input.GetKeyDown(KeyCode.I)) { Debug.Log(123); if (waitJumpCoroutine == null) { waitJumpCoroutine = StartCoroutine(WaitJump()); return; } jumpTimer = Time.time; } if (Input.GetButtonDown("Fire1")) { FireAction?.Invoke("Fire1"); } if (Input.GetButtonDown("Fire2")) { FireAction?.Invoke("Fire2"); } }
private void Update() { HorizontalAxis = Input.GetAxis("Horizontal"); if (Input.GetButtonDown("Jump")) { if (waitJumpCoroutine == null) { waitJumpCoroutine = StartCoroutine(WaitJump()); return; } jumpTimer = Time.time; } if (Input.GetButtonDown("Fire1")) { FireAction?.Invoke("Fire1"); } if (Input.GetButtonDown("Fire2")) { FireAction?.Invoke("Fire2"); } if (Input.GetKeyDown(KeyCode.LeftShift)) { RunSwitchAction?.Invoke(); } }
private void Update() { HorizontalAxis = Input.GetAxis("Horizontal"); if (Input.GetButtonDown("Jump")) { //animator.SetTrigger("Jump"); if (waitJumpCoroutine == null) { waitJumpCoroutine = StartCoroutine(WaitJump()); return; } jumpTimer = Time.time; } if (Input.GetButtonDown("Fire1")) { FireAction?.Invoke("Fire1"); } if (Input.GetButtonDown("Fire2")) { FireAction?.Invoke("Fire2"); } }