public void Setup(float speed, float angle)
    {
        float angularSpeed = angle * angleResponseTime;

        bool run = speed > 1 ? true : false;

        mov.VerticalMovements(speed, run);
        mov.rotate(angularSpeed);
    }
Example #2
0
    // Update is called once per frame
    void FixedUpdate()
    {
        bool  sprint = Input.GetButton("Sprint");
        float z      = mov.VerticalMovements(Input.GetAxisRaw("Vertical"), sprint);
        float x      = mov.HorizontalMovements(Input.GetAxisRaw("Horizontal"));

        mov.move(x, z);

        if (Input.GetButtonDown("Raise Stance"))
        {
            //	if (m_isAxisInUse == false) {
            //float stance = Input.GetAxisRaw ("Change Stance");
            mov.Stance(1);
            //m_isAxisInUse = true;
            //	}
        }
        else if (Input.GetButtonDown("Lower Stance"))
        {
            mov.Stance(-1);
        }
    }