Browse Source

Fixed missing variables

Replicated fix to other parts of text that mention same part of code.
Lucas Popenke 8 years ago
parent
commit
d4b398900f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      tutorials/step_by_step/simple_2d_game.rst

+ 2 - 0
tutorials/step_by_step/simple_2d_game.rst

@@ -126,6 +126,7 @@ The second one is to initalize our two member variables.
     # Member variables
     var screen_size
     var pad_size
+    var direction = Vector2(1.0, 0.0)
 
     func _ready():
         screen_size = get_viewport_rect().size
@@ -148,6 +149,7 @@ our ball move.
     # Member variables
     var screen_size
     var pad_size
+    var direction = Vector2(1.0, 0.0)
     
     # constant for pad speed (in pixels/second)
     const INITIAL_BALL_SPEED = 80