Prechádzať zdrojové kódy

Typo in C# example change velocity to _velocity

There's a typo in the C# example code:

MoveAndCollide(velocity * delta);

should be 

MoveAndCollide(_velocity * delta);
Zach Ruffin 5 rokov pred
rodič
commit
b8c26c2bad

+ 1 - 1
tutorials/physics/using_kinematic_body_2d.rst

@@ -263,7 +263,7 @@ Attach a script to the KinematicBody2D and add the following code:
         public override void _PhysicsProcess(float delta)
         {
             GetInput();
-            MoveAndCollide(velocity * delta);
+            MoveAndCollide(_velocity * delta);
         }
     }