Пример #1
0
    // Gets player inputs and calls move method in Truck Controller
    void FixedUpdate()
    {
        float horizontal = Input.GetAxis("Steer" + PlayerNum);
        float vertical   = Input.GetAxis("RightTrigger" + PlayerNum) * -1;
        float brake      = Input.GetAxis("LeftTrigger" + PlayerNum);
        bool  handbrake  = Input.GetButton("Handbrake" + PlayerNum);
        bool  nitro      = Input.GetButton("Nitro" + PlayerNum);

        truck.Move(horizontal, vertical, brake, handbrake, nitro);
    }