15 lines
430 B
GDScript3
15 lines
430 B
GDScript3
|
extends Area
|
||
|
|
||
|
onready var util = get_node("/root/Util")
|
||
|
onready var global_event_bus = get_node("/root/GlobalEventBus")
|
||
|
onready var player = util.player
|
||
|
|
||
|
func _on_SinkRegion_body_entered(body: Node):
|
||
|
if body.get_parent() == player:
|
||
|
global_event_bus.emit_signal("player_entered_meat_sink")
|
||
|
|
||
|
|
||
|
func _on_SinkRegion_body_exited(body: Node):
|
||
|
if body.get_parent() == player:
|
||
|
global_event_bus.emit_signal("player_exited_meat_sink")
|