Răsfoiți Sursa

Update references to Color constants for Godot 4 (#6602)

Anthony Cossins 2 ani în urmă
părinte
comite
f994d270f8
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      tutorials/scripting/gdscript/gdscript_basics.rst

+ 2 - 2
tutorials/scripting/gdscript/gdscript_basics.rst

@@ -1721,9 +1721,9 @@ the :ref:`Signal.connect() <class_Signal_method_connect>` method::
     ...
     ...
     func _on_Character_health_changed(old_value, new_value):
     func _on_Character_health_changed(old_value, new_value):
         if old_value > new_value:
         if old_value > new_value:
-            progress_bar.modulate = Color.red
+            progress_bar.modulate = Color.RED
         else:
         else:
-            progress_bar.modulate = Color.green
+            progress_bar.modulate = Color.GREEN
 
 
         # Imagine that `animate` is a user-defined function that animates the
         # Imagine that `animate` is a user-defined function that animates the
         # bar filling up or emptying itself.
         # bar filling up or emptying itself.