فهرست منبع

Replace "guards" with "enemies" for consistency

The Groups section shows how to create an "enemies" group but later on uses "guards" as the group's name.
David Pol 7 سال پیش
والد
کامیت
dafd6b58bb
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      learning/step_by_step/scripting_continued.rst

+ 4 - 4
learning/step_by_step/scripting_continued.rst

@@ -76,18 +76,18 @@ all enemies can be notified about the alarm sounding, by using
 ::
 ::
 
 
     func _on_discovered(): # this is a fictional function
     func _on_discovered(): # this is a fictional function
-        get_tree().call_group("guards", "player_was_discovered")
+        get_tree().call_group("enemies", "player_was_discovered")
 
 
 The above code calls the function "player_was_discovered" on every
 The above code calls the function "player_was_discovered" on every
-member of the group "guards".
+member of the group "enemies".
 
 
-Optionally, it is possible to get the full list of "guards" nodes by
+Optionally, it is possible to get the full list of "enemies" nodes by
 calling
 calling
 :ref:`SceneTree.get_nodes_in_group() <class_SceneTree_get_nodes_in_group>`:
 :ref:`SceneTree.get_nodes_in_group() <class_SceneTree_get_nodes_in_group>`:
 
 
 ::
 ::
 
 
-    var guards = get_tree().get_nodes_in_group("guards")
+    var enemies = get_tree().get_nodes_in_group("enemies")
 
 
 More will be added about
 More will be added about
 :ref:`SceneTree <class_SceneTree>`
 :ref:`SceneTree <class_SceneTree>`