2022-11-27 13:31:09 -07:00
|
|
|
extends Node
|
|
|
|
|
|
|
|
onready var global_event_bus = get_node("/root/GlobalEventBus")
|
|
|
|
var sink_counter = 0
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
global_event_bus.connect("player_entered_meat_sink", self, "on_player_enter_meat_sink")
|
|
|
|
global_event_bus.connect("player_exited_meat_sink", self, "on_player_exited_meat_sink")
|
|
|
|
|
|
|
|
func on_player_enter_meat_sink():
|
|
|
|
if sink_counter == 0:
|
2023-01-03 12:20:47 -07:00
|
|
|
$"../OnFootPhysics".increase_velocity_factor(Util.meat_sink_parameters.sink_factor)
|
2022-11-27 13:31:09 -07:00
|
|
|
sink_counter += 1
|
|
|
|
|
|
|
|
func on_player_exited_meat_sink():
|
|
|
|
sink_counter -= 1
|
|
|
|
if sink_counter == 0:
|
2023-01-03 12:20:47 -07:00
|
|
|
$"../OnFootPhysics".decrease_velocity_factor(Util.meat_sink_parameters.sink_factor)
|