18 lines
355 B
GDScript
18 lines
355 B
GDScript
extends NucleotidePreyState
|
|
|
|
@onready var timer = $Timer
|
|
var dir: float = 0.0
|
|
|
|
func enter(previous_state_path: String, data := {}) -> void:
|
|
timer.start(randi() % 5)
|
|
dir = randi() % 360
|
|
|
|
func physics_update(_delta: float) -> void:
|
|
# TODO: move in direction of dir
|
|
pass
|
|
|
|
|
|
func _on_timer_timeout() -> void:
|
|
dir = randi() % 360
|
|
timer.start(randi() % 5)
|