Exemple #1
0
        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");
            }
        }
Exemple #2
0
    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();
        }
    }
Exemple #3
0
    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");
        }
    }