mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
added the game
This commit is contained in:
32
Scripts/Parts/Disclaimer.gd
Normal file
32
Scripts/Parts/Disclaimer.gd
Normal file
@@ -0,0 +1,32 @@
|
||||
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:
|
||||
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")
|
Reference in New Issue
Block a user