Пример #1
0
 private void FixedUpdate()
 {
     if (controlledCar != null)
     {
         if (Input.GetKey(KeyCode.W))
         {
             controlledCar.Forward();
         }
         if (Input.GetKey(KeyCode.S))
         {
             controlledCar.Backward();
         }
         if (Input.GetKey(KeyCode.A))
         {
             controlledCar.Left();
         }
         if (Input.GetKey(KeyCode.D))
         {
             controlledCar.Right();
         }
     }
 }