feat: add playable generated dialogue mode

This commit is contained in:
Rijad Zuzo
2026-08-12 21:16:15 +02:00
parent 6b50580598
commit f8734422a0
11 changed files with 1012 additions and 8 deletions
+16 -3
View File
@@ -48,6 +48,11 @@ func _physics_process(delta: float) -> void:
if simulation_manager != null and simulation_manager.has_method("update_player_combatant"):
simulation_manager.update_player_combatant(player.global_position)
_advance_timers(delta)
if _input_is_locked():
dash_duration_remaining = 0.0
dashing = false
dash_velocity = Vector3.ZERO
return
if _player_is_downed():
attack_timer = 0.0
dash_duration_remaining = 0.0
@@ -81,7 +86,7 @@ func _player_is_downed() -> bool:
func _perform_attack() -> void:
if attack_timer > 0.0 or not _simulation_attack_ready():
if _input_is_locked() or attack_timer > 0.0 or not _simulation_attack_ready():
return
attack_timer = attack_cooldown_seconds
_play_swing()
@@ -100,7 +105,7 @@ func _perform_attack() -> void:
func _perform_dash() -> void:
if dash_cooldown_remaining > 0.0 or _player_is_downed():
if _input_is_locked() or dash_cooldown_remaining > 0.0 or _player_is_downed():
return
dash_duration_remaining = dash_duration
dash_cooldown_remaining = maxf(dash_cooldown_seconds, dash_duration)
@@ -144,7 +149,15 @@ func is_dashing() -> bool:
func get_dash_velocity() -> Vector3:
return dash_velocity if dashing else Vector3.ZERO
return dash_velocity if dashing and not _input_is_locked() else Vector3.ZERO
func _input_is_locked() -> bool:
return (
player != null
and player.has_method("is_dialogue_input_locked")
and bool(player.call("is_dialogue_input_locked"))
)
func get_dash_cooldown_remaining() -> float: