Compare commits

..

3 Commits

14 changed files with 54 additions and 30 deletions

Binary file not shown.

View File

@ -9,13 +9,12 @@ func _ready() -> void:
func start_room():
super.start_room()
await super.start_room()
Scenes.player_enable.emit(true)
await Main.curtain.open()
var next_room : String = await proceed # emitted by burnout_station.gd and therapy_station.gd
await Main.curtain.black()
Main._load_room(next_room)
func pull_save_state(save: SaveGame) -> void:
save.sequences_enabled = Scenes.enabled_sequences

View File

@ -2,4 +2,7 @@ extends Node3D
func _ready() -> void:
State.room.save_game.subway_burnout = true
%PlayerDetect.body_entered.connect(func(body): if visible and body is PlayerController: State.room.proceed.emit(Main.adulthood_room_path))
%PlayerDetect.body_entered.connect(func(body):
if visible and body is PlayerController:
await Main.curtain.black()
State.room.proceed.emit(Main.adulthood_room_path))

View File

@ -1,4 +1,8 @@
extends Node3D
func _ready() -> void:
%PlayerDetect.body_entered.connect(func(body): if visible and body is PlayerController: State.room.proceed.emit(Main.adulthood_room_path))
%PlayerDetect.body_entered.connect(func(body):
if visible and body is PlayerController:
State.room.save_game.subway_burnout = true
await Main.curtain.black()
State.room.proceed.emit(Main.adulthood_room_path))

View File

@ -27,12 +27,13 @@ func get_ready() -> void:
func start_room():
super.start_room()
await super.start_room()
%UI.show()
%PlayerController.process_mode = Node.PROCESS_MODE_INHERIT
# Give player control immediately, then open
Scenes.player_enable.emit(true)
await Main.curtain.open()

View File

@ -21,4 +21,4 @@ edit/normalize=false
edit/loop_mode=2
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0
compress/mode=2

View File

@ -21,4 +21,4 @@ edit/normalize=false
edit/loop_mode=2
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0
compress/mode=2

View File

@ -21,4 +21,4 @@ edit/normalize=false
edit/loop_mode=2
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0
compress/mode=2

View File

@ -21,4 +21,4 @@ edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0
compress/mode=2

View File

@ -9,14 +9,14 @@ extends RoomTemplate
func _ready() -> void:
id = State.rooms.YOUTH
super._ready() # UwU, superclass _ready is not called by Godot automatically...
super._ready() # UwU, superclass _ready is not called by Godot automatically...
func start_room():
super.start_room()
await super.start_room()
%UI.show()
await Main.curtain.open()
# To start breathing etc.
@ -28,10 +28,9 @@ func start_room():
await _play_intro_scene()
else:
%LightAnimationPlayer.lights_on()
%SceneAnimationPlayer.start_soundtrack()
Scenes.player_enable.emit(true)
@ -45,7 +44,7 @@ func get_ready():
super.get_ready()
prints("indeed")
Scenes.scene_finished.connect(_on_scene_finished)
card_board.board_completed.connect(func():
%DoorInteractable.show()
if not save_game.is_childhood_board_complete:
@ -63,8 +62,6 @@ func get_ready():
$sfx/distant_rain.play()
$"sfx/rain on window".play()
await get_tree().process_frame
func pull_save_state(save: SaveGame) -> void:
save_game = save
@ -102,3 +99,7 @@ func play_chest_reveal() -> void:
$visuals/AnimationPlayer.play("chest_reveal")
$visuals/SecondaryAnimation.play("chest_reveal")
await $visuals/AnimationPlayer.animation_finished
func play_thunder() -> void:
%RoomAnimationPlayer.play("lightning_and_thunder")

View File

@ -817,6 +817,7 @@ billboard = false
transform = Transform3D(-0.99999964, 0, -8.7422755e-08, 0, 1, 0, 8.7422755e-08, 0, -0.99999964, 0.30241805, 0.49012983, -5.9604645e-08)
[node name="RoomAnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
&"": ExtResource("23_corra")
}

View File

@ -8,11 +8,21 @@ func _ready() -> void:
Scenes.scene_finished.connect(_on_scene_finished)
func start_soundtrack():
$Moving.play(70)
$Childhood.play(70)
$VoiceTraining.play(70)
_fade_in($Moving)
_fade_in($Childhood,)
_fade_in($VoiceTraining)
var tween := create_tween()
tween.tween_property($Moving, "volume_db", 0, 3.0)
func _fade_in(audio_stream : AudioStreamPlayer) -> void:
if not audio_stream.playing:
audio_stream.volume_db = -80
audio_stream.play(70)
func _on_scene_starting(scene_id: Scenes.id, _repeat: bool) -> void:
print_debug("YouthRoomScenePlayer._on_scene_starting(%s)" % Scenes.id.keys()[scene_id])
# Handle scene-specific music
# Note: Chest animation is now handled by YouthRoom.prepare_scene_start()
@ -25,6 +35,7 @@ func _on_scene_starting(scene_id: Scenes.id, _repeat: bool) -> void:
play("jui_jutsu_music")
Scenes.id.YOUTH_DRAVEN:
play("draeven")
_: pass
func _on_scene_finished(scene_id: Scenes.id, _repeat: bool) -> void:
print_debug("YouthRoomScenePlayer._on_scene_finished(%s)" % Scenes.id.keys()[scene_id])
@ -34,9 +45,12 @@ func _on_scene_finished(scene_id: Scenes.id, _repeat: bool) -> void:
play_backwards("childhood_music")
Scenes.id.YOUTH_VOICE_TRAINING:
play_backwards("voice_music")
Scenes.id.YOUTH_JUI_JUTSU:
play_backwards("jui_jutsu_music")
queue("RESET")
func play(anim_name: StringName = "", a: float = -1, b: float = 1, c: bool = false) -> void:
print_debug("YouthRoomScenePlayer.play(%s)" % anim_name)
super.play(anim_name, a, b, c)

View File

@ -38,7 +38,7 @@ func play() -> String:
func start_room():
prints("----------", "START_ROOM", self.name, "--------------")
Main.curtain.open()
await get_tree().process_frame # so this registers as a coroutine in IDE
func pull_save_state(_save: SaveGame) -> void:

View File

@ -4,7 +4,6 @@ extends Playable
signal text_finished
signal finished
signal intro
signal emit_thunder
@export var scene_id : Scenes.id
@ -29,7 +28,6 @@ var progress: float = 0:
elif progress > 0:
for i in range(min(progress, substring_sizes.size()-1) as int) if progress > 0 else range(substring_sizes.size()-1):
start_index += substring_sizes[i]
label.visible_characters = start_index + int(substring_sizes[min(progress as int, substring_sizes.size()-1)] * fmod(progress, 1))
else:
label.visible_ratio = 0
@ -179,6 +177,7 @@ func play():
finished.emit()
func _unhandled_input(event: InputEvent) -> void:
var just_revealed_text := false
if event is InputEventMouseButton:
@ -222,5 +221,7 @@ func _on_text_finished():
if not animation_complete:
text_finished.emit()
func _emit_thunder():
emit_thunder.emit()
func _emit_thunder() -> void:
if State.room is YouthRoom: State.room.play_thunder()