Bladeren bron

doc: replace incorrect Speed variable with _speed

RaspberryEuphoria 2 jaren geleden
bovenliggende
commit
ec366a691d
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      getting_started/step_by_step/scripting_player_input.rst

+ 1 - 1
getting_started/step_by_step/scripting_player_input.rst

@@ -102,7 +102,7 @@ velocity. Replace the line starting with ``var velocity`` with the code below.
     var velocity = Vector2.Zero;
     var velocity = Vector2.Zero;
     if (Input.IsActionPressed("ui_up"))
     if (Input.IsActionPressed("ui_up"))
     {
     {
-        velocity = Vector2.Up.Rotated(Rotation) * Speed;
+        velocity = Vector2.Up.Rotated(Rotation) * _speed;
     }
     }
 
 
 We initialize the ``velocity`` with a value of ``Vector2.ZERO``, another
 We initialize the ``velocity`` with a value of ``Vector2.ZERO``, another