20 lines
412 B
GDScript
20 lines
412 B
GDScript
class_name NPCRunnerThinker extends Node
|
|
|
|
@onready var runner := $'..' as Runner
|
|
|
|
func impetus() -> Vector3:
|
|
return Vector3.ZERO
|
|
|
|
func should_jump() -> bool:
|
|
return false
|
|
|
|
func should_do_ability() -> bool:
|
|
return false
|
|
|
|
func _physics_process(_delta: float) -> void:
|
|
runner.impetus = impetus()
|
|
if should_jump():
|
|
runner.jump()
|
|
elif should_do_ability() and runner.state != &'ability':
|
|
runner.do_ability()
|