@@ -363,7 +363,7 @@ string. That's why we write it as ``"animated_health"``.
363
363
364
364
The starting point is the current value the bar's at. We still have to
365
365
code this part, but it's going to be ``animated_health ``. The end point
366
- of the animation is the ``Player ``'s ``health `` after he
366
+ of the animation is the ``Player ``'s ``health `` after the
367
367
``health_changed ``: that's ``new_value ``. And ``0.6 `` is the animation's
368
368
duration in seconds.
369
369
@@ -401,8 +401,8 @@ So far, the update\_health method looks like this:
401
401
402
402
func update_health(new_value):
403
403
tween.interpolate_property(self, "animated_health", animated_health, new_value, 0.6, Tween.TRANS_LINEAR, Tween.EASE_IN)
404
- if not Tween .is_active():
405
- Tween .start()
404
+ if not tween .is_active():
405
+ tween .start()
406
406
407
407
In this specific case, because ``number_label `` takes text, we need to
408
408
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
519
519
520
520
::
521
521
522
- Tween .interpolate_property(self, "modulate", start_color, end_color, 1.0, Tween.TRANS_LINEAR, Tween.EASE_IN)
522
+ tween .interpolate_property(self, "modulate", start_color, end_color, 1.0, Tween.TRANS_LINEAR, Tween.EASE_IN)
523
523
524
524
This time we change the ``modulate `` property and have it animate from
525
525
``start_color `` to the ``end_color ``. The duration is of one second,
0 commit comments