2023-01-03 13:19:39 -07:00
|
|
|
extends MeshInstance
|
2022-11-27 13:31:09 -07:00
|
|
|
|
|
|
|
onready var global_event_bus = get_node("/root/GlobalEventBus")
|
2023-01-03 13:19:39 -07:00
|
|
|
|
|
|
|
func _ready():
|
|
|
|
var mat = get_active_material(0).next_pass
|
|
|
|
if Util.meat_sink_parameters == null:
|
|
|
|
yield(Util, "meat_sink_parameters")
|
|
|
|
if not Util.meat_sink_parameters.mind_fuck:
|
|
|
|
mat.set_shader_param("alpha", 0.07)
|
|
|
|
else:
|
|
|
|
mat.set_shader_param("alpha", 1.0)
|
2022-11-27 13:31:09 -07:00
|
|
|
|
|
|
|
func _on_SinkRegion_body_entered(body: Node):
|
2023-01-03 13:19:39 -07:00
|
|
|
if body.get_parent() == Util.player:
|
2022-11-27 13:31:09 -07:00
|
|
|
global_event_bus.emit_signal("player_entered_meat_sink")
|
|
|
|
|
|
|
|
|
|
|
|
func _on_SinkRegion_body_exited(body: Node):
|
2023-01-03 13:19:39 -07:00
|
|
|
if body.get_parent() == Util.player:
|
2022-11-27 13:31:09 -07:00
|
|
|
global_event_bus.emit_signal("player_exited_meat_sink")
|