Beispiel #1
0
    private void FixedUpdate()
    {
        // Read the inputs.
        crouch = false;
        float h = dir;

        // Pass all parameters to the character control script.
        m_Character.Move(h, crouch, m_Jump);
        m_Jump = false;
    }
Beispiel #2
0
    private void FixedUpdate()
    {
        if (isDead)
        {
            return;
        }
        // Read the inputs.
        bool  crouch = Input.GetKey(KeyCode.LeftControl);
        float h      = Input.GetAxis("Horizontal");

        // Pass all parameters to the character control script.
        m_Character.Move(h, crouch, m_Jump);
        m_Jump = false;
    }