소스 검색

Merge pull request #8037 from fearn-e/characterbody2d-tutorial-cs-typo

C# code example bug in CharacterBody2D tutorial
Max Hilbrunner 1 년 전
부모
커밋
70ac3fc69b
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;