refactoring ai and add new animations

This commit is contained in:
2026-05-24 17:39:04 +02:00
parent 0c237430ea
commit 9e5946ddab
21 changed files with 4375 additions and 81 deletions

View File

@@ -1,25 +0,0 @@
extends State
@export var wait_time: float = 3.0
var runtime_timer: Timer
func enter() -> void:
run_animation()
runtime_timer = Timer.new()
runtime_timer.name = "IdleTimer"
add_child(runtime_timer)
runtime_timer.one_shot = true
runtime_timer.timeout.connect(_on_timer_timeout)
runtime_timer.start(wait_time)
func exit() -> void:
if runtime_timer:
if runtime_timer.is_connected("timeout", _on_timer_timeout):
runtime_timer.timeout.disconnect(_on_timer_timeout)
runtime_timer.queue_free()
runtime_timer = null
func _on_timer_timeout() -> void:
transitioned.emit(self, next_state_id)

View File

@@ -1 +0,0 @@
uid://nga8qx56iwgu

View File

@@ -1,9 +0,0 @@
extends State
func enter() -> void:
run_animation()
agent.navigate_to_random_point()
func physics_update(_delta) -> void:
if agent.nav_agent.is_navigation_finished():
transitioned.emit(self, next_state_id)

View File

@@ -1 +0,0 @@
uid://bngfthvt04ivv