Bläddra i källkod

Merge pull request #2150 from brunodantas/master

Naming convention adherence for variable
Nathan Lovato 6 år sedan
förälder
incheckning
8a3a087d9d
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4 4
      getting_started/step_by_step/your_first_game.rst

+ 4 - 4
getting_started/step_by_step/your_first_game.rst

@@ -163,7 +163,7 @@ Start by declaring the member variables this object will need:
     extends Area2D
     extends Area2D
 
 
     export var speed = 400  # How fast the player will move (pixels/sec).
     export var speed = 400  # How fast the player will move (pixels/sec).
-    var screensize  # Size of the game window.
+    var screen_size  # Size of the game window.
 
 
  .. code-tab:: csharp
  .. code-tab:: csharp
 
 
@@ -198,7 +198,7 @@ which is a good time to find the size of the game window:
  .. code-tab:: gdscript GDScript
  .. code-tab:: gdscript GDScript
 
 
     func _ready():
     func _ready():
-        screensize = get_viewport_rect().size
+        screen_size = get_viewport_rect().size
 
 
  .. code-tab:: csharp
  .. code-tab:: csharp
 
 
@@ -317,8 +317,8 @@ to the bottom of the ``_process`` function:
  .. code-tab:: gdscript GDScript
  .. code-tab:: gdscript GDScript
 
 
         position += velocity * delta
         position += velocity * delta
-        position.x = clamp(position.x, 0, screensize.x)
-        position.y = clamp(position.y, 0, screensize.y)
+        position.x = clamp(position.x, 0, screen_size.x)
+        position.y = clamp(position.y, 0, screen_size.y)
 
 
  .. code-tab:: csharp
  .. code-tab:: csharp