Example #1
0
 private void GetPlayerInput()
 {
     if (Input.GetKey(leftButton))
     {
         leftIsPressed = true;
     }
     if (Input.GetKey(rightButton))
     {
         rightIsPressed = true;
     }
     if (Input.GetKey(upButton))
     {
         upIsPressed = true;
     }
     if (Input.GetKey(downButton))
     {
         downIsPressed = true;
     }
     if (Input.GetKeyDown(boostButton))
     {
         myVehicleScript.Boost();
     }
 }