2019-12-21 21:20:06 +01:00
|
|
|
extends Node2D
|
|
|
|
|
|
|
|
|
2019-12-23 17:38:27 +01:00
|
|
|
onready var gui: = $GUI
|
|
|
|
onready var pursuer: = $BoundaryManager/Pursuer
|
|
|
|
onready var seeker: = $BoundaryManager/Seeker
|
2019-12-21 21:20:06 +01:00
|
|
|
|
|
|
|
|
|
|
|
func _ready() -> void:
|
2019-12-23 17:38:27 +01:00
|
|
|
gui.linear_speed.text = str(pursuer.agent.max_linear_speed)
|
|
|
|
gui.linear_accel.text = str(pursuer.agent.max_linear_acceleration)
|
|
|
|
gui.connect("linear_accel_changed", self, "_on_GUI_linear_accel_changed")
|
|
|
|
gui.connect("linear_speed_changed", self, "_on_GUI_linear_speed_changed")
|
2019-12-21 21:20:06 +01:00
|
|
|
|
|
|
|
|
|
|
|
func _on_GUI_linear_accel_changed(value: int) -> void:
|
2019-12-23 17:38:27 +01:00
|
|
|
pursuer.agent.max_linear_acceleration = float(value)
|
|
|
|
seeker.agent.max_linear_acceleration = float(value)
|
2019-12-21 21:20:06 +01:00
|
|
|
|
|
|
|
|
|
|
|
func _on_GUI_linear_speed_changed(value: int) -> void:
|
2019-12-23 17:38:27 +01:00
|
|
|
pursuer.agent.max_linear_speed = float(value)
|
|
|
|
seeker.agent.max_linear_speed = float(value)
|