浏览代码

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 年之前
父节点
当前提交
b8c26c2bad
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tutorials/physics/using_kinematic_body_2d.rst

+ 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)
         public override void _PhysicsProcess(float delta)
         {
         {
             GetInput();
             GetInput();
-            MoveAndCollide(velocity * delta);
+            MoveAndCollide(_velocity * delta);
         }
         }
     }
     }