mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Use 4.0 method of connecting to and emitting signals (#6311)
Change docs to use the new method of connecting and emitting signals
This commit is contained in:
@@ -478,7 +478,7 @@ this code to the function:
|
||||
|
||||
func _on_Player_body_entered(body):
|
||||
hide() # Player disappears after being hit.
|
||||
emit_signal("hit")
|
||||
hit.emit()
|
||||
# Must be deferred as we can't change physics properties on a physics callback.
|
||||
$CollisionShape2D.set_deferred("disabled", true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user