adding script water-zone

This commit is contained in:
AleaJactaEst 2022-02-06 01:51:53 +01:00
parent 6a3e4f21f3
commit 68b701bb83

11
maps/water-zone.gd Normal file
View file

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