22 lines
437 B
GDScript3
22 lines
437 B
GDScript3
|
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()
|
||
|
|
||
|
|
||
|
func _on_area_3d_body_entered(body):
|
||
|
if body.has_method("enter_boat"):
|
||
|
body.enter_boat($delta_boat)
|
||
|
|
||
|
|
||
|
func _on_area_3d_body_exited(body):
|
||
|
if body.has_method("exit_boat"):
|
||
|
body.exit_boat($delta_boat)
|