From 68b701bb83118cf635445eb09db01eed9ac03f9e Mon Sep 17 00:00:00 2001 From: AleaJactaEst Date: Sun, 6 Feb 2022 01:51:53 +0100 Subject: [PATCH] adding script water-zone --- maps/water-zone.gd | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 maps/water-zone.gd diff --git a/maps/water-zone.gd b/maps/water-zone.gd new file mode 100644 index 0000000..54eee63 --- /dev/null +++ b/maps/water-zone.gd @@ -0,0 +1,11 @@ +extends Node3D + + +func _on_underwater_body_entered(body): + if body.has_method("enter_underwater"): + body.enter_underwater() + + +func _on_underwater_body_exited(body): + if body.has_method("exit_underwater"): + body.exit_underwater()