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:
BlueStag
2023-01-23 03:01:34 +00:00
committed by GitHub
parent 7b21d5c293
commit 135ad68cab
12 changed files with 47 additions and 49 deletions

View File

@@ -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)