@tool
extends Node

var simulation_started
@export var UL1_3 : Node
@export var box_spawner: Node


func _enter_tree() -> void:
	SimulationEvents.simulation_started.connect(_simulation_started)
	SimulationEvents.simulation_ended.connect(_simulation_ended)
	

func _simulation_started():
	simulation_started = true
	print("Started !")
	
	
	
func _simulation_ended():
	simulation_started = false
	print("Stopped !")
	

func _physics_process(delta: float) -> void:
	if(!simulation_started):
		return
		
	box_spawner.disable = UL1_3.speed == 0
