adding script water-zone
This commit is contained in:
parent
6a3e4f21f3
commit
68b701bb83
1 changed files with 11 additions and 0 deletions
11
maps/water-zone.gd
Normal file
11
maps/water-zone.gd
Normal 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()
|
Loading…
Reference in a new issue