26 lines
520 B
GDScript3
26 lines
520 B
GDScript3
|
|
extends LimboState
|
||
|
|
|
||
|
|
@export var grap_hook_shooting_time: float
|
||
|
|
|
||
|
|
var _timer: float
|
||
|
|
|
||
|
|
func _enter() -> void:
|
||
|
|
agent.locomotion_comp.suspend_movement()
|
||
|
|
agent.locomotion_comp.stop_dash(true)
|
||
|
|
|
||
|
|
agent.spawn_hook_comp.spawn_grap_hook_inst()
|
||
|
|
agent.spawn_hook_comp.grap_reach_target(grap_hook_shooting_time)
|
||
|
|
|
||
|
|
_timer = grap_hook_shooting_time
|
||
|
|
|
||
|
|
func _update(delta: float) -> void:
|
||
|
|
|
||
|
|
if _timer <= 0:
|
||
|
|
self.dispatch(self.EVENT_FINISHED)
|
||
|
|
|
||
|
|
_timer -= delta
|
||
|
|
|
||
|
|
func _exit() -> void:
|
||
|
|
#agent.locomotion_comp.enable_movement()
|
||
|
|
pass
|