31 lines
568 B
GDScript
31 lines
568 B
GDScript
@tool
|
|
extends Node
|
|
|
|
var simulation_started
|
|
@export var FL1038_2 : 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
|
|
|
|
print(FL1038_2.speed)
|
|
box_spawner.disable = FL1038_2.speed == 0
|