Переглянути джерело

Fix csharp bug in tutorial code

fearn-e 1 рік тому
батько
коміт
3ca515ee9f
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      tutorials/physics/using_character_body_2d.rst

+ 1 - 1
tutorials/physics/using_character_body_2d.rst

@@ -511,7 +511,7 @@ Here's the code for the player body:
                 velocity.Y = _jumpSpeed;
 
             // Get the input direction.
-            Vector2 direction = Input.GetAxis("ui_left", "ui_right");
+            float direction = Input.GetAxis("ui_left", "ui_right");
             velocity.X = direction * _speed;
 
             Velocity = velocity;