Raise-Your-Wand/Scripts/TitleScreen.gd
nc543 5079a77296 Main Menu and AI
- Mostly finished the settings menu
- Got basic AI working on easy difficulty
- Changed when animations are loaded
- Music now changes when you hit play
- Changed how AI will work. All enemies should only need the combatant script now
2024-05-12 00:22:34 -04:00

53 lines
1.2 KiB
GDScript

extends Control
@onready var raise: RichTextLabel = $Title/Raise
@onready var your: RichTextLabel = $Title/Your
@onready var wand: RichTextLabel = $Title/Wand
@onready var disclaimer: RichTextLabel = $Title/Disclaimer
@onready var play: TextureButton = $Buttons/Play
@onready var credits: TextureButton = $Buttons/Credits
@onready var settings: TextureButton = $Buttons/Settings
@onready var quit: TextureButton = $Buttons/Quit
@onready var about: TextureButton = $Buttons/About
@onready var settingsMenu: Control = $"../Settings"
@onready var musicPlayer: MusicPlayer = $/root/Root/MusicPlayer
@export var arena: String
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_play_pressed():
var a: Node2D = load(arena).instantiate()
$/root/Root.add_child(a)
$/root/Root/MainMenu.queue_free()
musicPlayer.setLoc(Data.Location.ARENA)
func _on_credits_pressed():
print("Credits")
func _on_settings_pressed():
self.hide()
settingsMenu.show()
func _on_about_pressed():
print("About")
func _on_quit_pressed():
get_tree().quit()