diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-09-16 08:45:53 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-09-16 08:45:53 -0400 |
commit | 0b7daa101c282fe83b6d75b080e25d0e2147253f (patch) | |
tree | 04b5af2ed9dddbcb2dc765c28b1af22de74d40f5 /Trigger.gd | |
parent | f8d1f2dc1bd6356c33d023629fbef27f362c7aa2 (diff) | |
download | game_jam49-0b7daa101c282fe83b6d75b080e25d0e2147253f.tar.gz game_jam49-0b7daa101c282fe83b6d75b080e25d0e2147253f.zip |
Add Trigger in lower hallway to hide water below deck
Diffstat (limited to 'Trigger.gd')
-rw-r--r-- | Trigger.gd | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Trigger.gd b/Trigger.gd new file mode 100644 index 0000000..b8bc471 --- /dev/null +++ b/Trigger.gd @@ -0,0 +1,12 @@ +extends Spatial + +signal entered +signal exited + +func _on_Inside_body_exited(body:Node): + if $Outside.overlaps_body(body): + emit_signal("exited") + +func _on_Outside_body_exited(body:Node): + if $Inside.overlaps_body(body): + emit_signal("entered") |