feat: lvl 3
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 15s
Create tag and build when new code gets to main / Export (push) Successful in 2m33s

This commit is contained in:
2025-06-29 14:33:23 +02:00
parent bd72931024
commit 9c2bbd631f
4 changed files with 422 additions and 13 deletions

View File

@ -18,6 +18,8 @@ extends Node2D
@onready var timer_between_vo: Timer = $TimerBetweenVO
var is_interjection_next = false
var current_info: int = 0
var is_over = false
var currently_playing: AudioStreamPlayer2D
@onready var vo_prise_tiree: AudioStreamPlayer2D = $Hack/VOPriseTiree
@onready var vo_interjection: AudioStreamPlayer2D = $Hack/VOInterjection
@ -54,6 +56,10 @@ func _ready() -> void:
vo_players.append(vo_player_9)
vo_players.append(vo_player_10)
currently_playing = vo_players[current_info]
vo_players[current_info].play()
current_info += 1
func _on_prise_interacted(event_id: String) -> void:
wrong_hack.deactivate()
@ -67,15 +73,21 @@ func made_mistake() -> void:
SceneLoader.load_scene(golé)
func _on_failed_hack(event_id: String) -> void:
if currently_playing != null and currently_playing.playing:
currently_playing.stop()
made_mistake()
interact.play()
vo_trop_proche.play()
currently_playing = vo_trop_proche
func _on_successful_hack(event_id: String) -> void:
if currently_playing != null and currently_playing.playing:
currently_playing.stop()
right_door.activate()
wrong_door.deactivate()
interact.play()
vo_prise_tiree.play()
currently_playing = vo_prise_tiree
right_door.visible = true
func _on_interactible_triggered(event_id: String) -> void:
@ -89,14 +101,19 @@ func _on_right_door_event_triggered(event_id: String) -> void:
SceneLoader.load_scene(next_level) # Replace with function body.
func _on_timer_between_vo_timeout() -> void:
if is_interjection_next:
vo_interjection.play()
is_interjection_next = not is_interjection_next
if currently_playing != null and currently_playing.playing:
return
if is_over:
vo_interjection.play()
if current_info >= len(vo_players):
is_over = true
return
currently_playing = vo_players[current_info]
vo_players[current_info].play()
current_info += 1
is_interjection_next = not is_interjection_next
func _on_vo_trop_proche_finished() -> void:
pass

File diff suppressed because one or more lines are too long

View File

@ -166,8 +166,6 @@ script = ExtResource("1_dovo2")
move = ExtResource("2_gmlin")
interact = ExtResource("3_lvxji")
[node name="AudioListener2D" type="AudioListener2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 2)
shape = SubResource("CapsuleShape2D_dovo2")