예제 #1
0
    private void Update()
    {
        m_animator.SetFloat(m_speedHash, m_controlledCharacter.GetNormalizedSpeed());

        //UnderWater = false;


        if (Input.GetButtonDown("Jump") && !UnderWater && m_characterController.isGrounded)
        {
            m_animator.SetTrigger("jump");
        }

        //if (Input.GetKeyDown(KeyCode.E) && !UnderWater && m_characterController.isGrounded)
        //{
        //    m_animator.SetBool("shift_jump", !m_animator.GetBool("shift_jump"));
        //}

        //m_animator.gravityWeight

        if (Input.GetButtonDown/*GetKeyDown*/ ("Fire1" /*KeyCode.F*/))
        {
            m_animator.SetTrigger("attack");
        }
    }
예제 #2
0
 private void Update()
 {
     m_animator.SetFloat(m_speedHash, m_controlledCharacter.GetNormalizedSpeed());
 }