mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00

- Fixed Disclaimer Screen not playing Sound Effects loaded from the Resource Pack - Fixed Quit Dialog not playing Beep.wav loaded from Resource Packs - Fixed the Campaign Icons not loading the Resource Pack textures (in fairness the only icon applicable is the Custom Levels one)
38 lines
1.3 KiB
GDScript
38 lines
1.3 KiB
GDScript
extends Node
|
|
|
|
var can_skip := false
|
|
|
|
@export var default_font: Font = null
|
|
|
|
func _enter_tree() -> void:
|
|
if Settings.file.game.lang != "jp":
|
|
for i in [$Title, $"1", $"2", $Enjoy]:
|
|
i.remove_theme_font_override("font")
|
|
i.uppercase = true
|
|
|
|
func _ready() -> void:
|
|
var animation: Animation = $AnimationPlayer.get_animation_library("").get_animation(&"Go")
|
|
var track: int = animation.find_track("AudioStreamPlayer", Animation.TYPE_AUDIO)
|
|
for key in animation.track_get_key_count(track):
|
|
var resource_getter = ResourceGetter.new() #Why do I have to make a new one each time?
|
|
animation.audio_track_set_key_stream(track, key, resource_getter.get_resource(animation.audio_track_get_key_stream(track, key)))
|
|
Global.debugged_in = false
|
|
Global.get_node("GameHUD").hide()
|
|
await get_tree().create_timer(1, false).timeout
|
|
can_skip = true
|
|
|
|
func _exit_tree() -> void:
|
|
Global.get_node("GameHUD").show()
|
|
|
|
func _process(_delta: float) -> void:
|
|
if Input.is_action_just_pressed("jump_0") and can_skip:
|
|
go_to_menu()
|
|
|
|
func go_to_menu() -> void:
|
|
if Global.rom_path == "":
|
|
Global.transition_to_scene("res://Scenes/Levels/RomVerifier.tscn")
|
|
elif not Global.rom_assets_exist:
|
|
Global.transition_to_scene("res://Scenes/Levels/RomResourceGenerator.tscn")
|
|
else:
|
|
Global.transition_to_scene("res://Scenes/Levels/TitleScreen.tscn")
|