First commit

This commit is contained in:
2025-12-04 11:13:48 -05:00
commit 5d8452c70d
39 changed files with 1509 additions and 0 deletions

41
scripts/title_screen.gd Normal file
View File

@@ -0,0 +1,41 @@
extends Control
var opened : bool = false
var menu_choice : int = 0
@onready var menu_list : Array = [
%STORY,
%"VS-COM",
%"VS-MAN",
%RECORD,
%OPTION
]
func _process(delta: float) -> void:
if Input.is_action_just_pressed("ui_menu"):
opened = !opened
%START.visible = !opened
%Menu.visible = opened
%SelectSound.play()
if opened:
menu_choice = 0
switch_menu()
if opened:
if Input.is_action_just_pressed("ui_up"):
menu_choice -= 1
if menu_choice < 0:
menu_choice = len(menu_list) - 1
%SwitchSound.play()
switch_menu()
elif Input.is_action_just_pressed("ui_down"):
menu_choice += 1
if menu_choice >= len(menu_list):
menu_choice = 0
%SwitchSound.play()
switch_menu()
func switch_menu() -> void:
for child in %Menu.get_children():
child.visible = false
menu_list[menu_choice].visible = true