Browse Source

Merge pull request #1118 from daglilley/master

Fix typos in Control the game's UI with code
Nathan Lovato 7 years ago
parent
commit
b7eb06533a
1 changed files with 4 additions and 4 deletions
  1. 4 4
      getting_started/step_by_step/ui_code_a_life_bar.rst

+ 4 - 4
getting_started/step_by_step/ui_code_a_life_bar.rst

@@ -363,7 +363,7 @@ string. That's why we write it as ``"animated_health"``.
 
 
 The starting point is the current value the bar's at. We still have to
 The starting point is the current value the bar's at. We still have to
 code this part, but it's going to be ``animated_health``. The end point
 code this part, but it's going to be ``animated_health``. The end point
-of the animation is the ``Player``'s ``health`` after he
+of the animation is the ``Player``'s ``health`` after the
 ``health_changed``: that's ``new_value``. And ``0.6`` is the animation's
 ``health_changed``: that's ``new_value``. And ``0.6`` is the animation's
 duration in seconds.
 duration in seconds.
 
 
@@ -401,8 +401,8 @@ So far, the update\_health method looks like this:
 
 
     func update_health(new_value):
     func update_health(new_value):
         tween.interpolate_property(self, "animated_health", animated_health, new_value, 0.6, Tween.TRANS_LINEAR, Tween.EASE_IN)
         tween.interpolate_property(self, "animated_health", animated_health, new_value, 0.6, Tween.TRANS_LINEAR, Tween.EASE_IN)
-        if not Tween.is_active():
-            Tween.start()
+        if not tween.is_active():
+            tween.start()
 
 
 In this specific case, because ``number_label`` takes text, we need to
 In this specific case, because ``number_label`` takes text, we need to
 use the ``_process`` method to animate it. Let's now update the
 use the ``_process`` method to animate it. Let's now update the
@@ -519,7 +519,7 @@ We then have to call the ``interpolate_property`` method of the
 
 
 ::
 ::
 
 
-    Tween.interpolate_property(self, "modulate", start_color, end_color, 1.0, Tween.TRANS_LINEAR, Tween.EASE_IN)
+    tween.interpolate_property(self, "modulate", start_color, end_color, 1.0, Tween.TRANS_LINEAR, Tween.EASE_IN)
 
 
 This time we change the ``modulate`` property and have it animate from
 This time we change the ``modulate`` property and have it animate from
 ``start_color`` to the ``end_color``. The duration is of one second,
 ``start_color`` to the ``end_color``. The duration is of one second,