ft: prey sprite update

This commit is contained in:
djaidjai committed 2026-01-29 10:31:24 +01:00
1 parent 7207626315
commit 69776a6973
10 files changed
+34 -22

No files matched your search

@@ -1,17 +1,19 @@
extends State
@onready var timer = $Timer
var dir = Vector3(1, 1, 0)
func enter(previous_state_path: String, data := {}) -> void:
timer.start((float)(randi() % 5)/5)
func physics_update(_delta: float) -> void:
owner.move(Vector3(randfn(0, 1), randfn(0, 1), 0))
owner.move(_delta * dir)
#owner.move(_delta * Vector3(randfn(0, 1), randfn(0, 1), 0))
func _on_timer_timeout() -> void:
if (randi() % 4 != 0):
finished.emit(owner.fsm.States.RANDOMMOVEMENT, {})
finished.emit(owner.fsm.States.IDLE, {})
#finished.emit(owner.fsm.States.RANDOMMOVEMENT, {})
else:
finished.emit(owner.fsm.States.IDLE, {})
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.