Godot

Groups

_on_discovered():
    get_tree().call_group(“enemies”, “player_was_discovered”)

var enemies = get_tree().get_nodes_in_group("enemies")

Yield (Coroutine) example

func some_func():
  set_process(false) # turn off physics
  $AnimationPlayer.play("jump")
  yield($AnimationPlayer, "animation_finished") # wait until signal
  set_process(true)