2024-12-18 16:35:26 -05:00
|
|
|
class_name MainMenu extends Node
|
|
|
|
|
2024-12-31 23:31:28 -05:00
|
|
|
func _enter_tree():
|
2024-12-18 16:35:26 -05:00
|
|
|
preload("res://Scenes/Gameplay/Houses/house0.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/Houses/house1.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/Houses/house2.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/block.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/ring.tscn")
|
2024-12-18 22:48:05 -05:00
|
|
|
preload("res://Scenes/Gameplay/grinchRing.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/deliveryMarker.tscn")
|
2024-12-20 01:39:49 -05:00
|
|
|
preload("res://Scenes/StuckSpot.tscn")
|
2024-12-31 23:31:28 -05:00
|
|
|
preload("res://Scenes/Gameplay/block.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/ChimneyGame.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/City.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/deliveryMarker.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/grinchRing.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/Houses/house0.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/Houses/house1.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/Houses/house2.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/ring.tscn")
|
|
|
|
preload("res://Scenes/Gameplay/sleigh.tscn")
|
|
|
|
preload("res://Scenes/Models/rudolphModel.tscn")
|
|
|
|
preload("res://Scenes/Models/santaModel.tscn")
|
|
|
|
preload("res://Scenes/Models/sleighModel.tscn")
|
|
|
|
preload("res://Scenes/Models/stagModel.tscn")
|
|
|
|
preload("res://Scenes/reindeerSteps.tscn")
|
|
|
|
preload("res://Scenes/smoke.tscn")
|
|
|
|
preload("res://Scenes/StuckSpot.tscn")
|
|
|
|
preload("res://Scenes/UI/CreditTemplate.tscn")
|
|
|
|
preload("res://Scenes/UI/FPSCounter.tscn")
|
|
|
|
preload("res://Sounds/Ambiance/nighttime-outdoor-fireplace-70583.mp3")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/001 falling impact.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/002 wind blowing.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/003 santa claus_ho ho ho.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/004 swosh.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/008 short blow.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/012 wind (moderate, strong).wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/013 ping #1.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/014 throwing.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/015 snowball.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/016 ping #2.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/026 snowball hit.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/035 slurpping (straw).wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/038 magic twinkle.wav")
|
|
|
|
preload("res://Sounds/Effects/Christmas Sound Effects #1 (by MrSnooze)/042 freezing.wav")
|
|
|
|
preload("res://Sounds/Music/Faster_Version-2023-08-25_-_Soaring_Sleighride_-_www.FesliyanStudios.com.wav")
|
|
|
|
preload("res://Sounds/Music/Slower_Version-2023-08-25_-_Holiday_Homecoming_-_www.FesliyanStudios.com.wav")
|
|
|
|
preload("res://Sprites/arrow.png")
|
|
|
|
preload("res://Sprites/gift.png")
|
|
|
|
preload("res://Sprites/kenney_particle-pack/PNG (Transparent)/star_07.png")
|
|
|
|
preload("res://Sprites/Noise/deliveryNoise.tres")
|
|
|
|
preload("res://Sprites/Noise/groundSnow.tres")
|
|
|
|
preload("res://Sprites/Noise/ringNoise.tres")
|
|
|
|
preload("res://Sprites/Speedometer/needle.png")
|
|
|
|
preload("res://Sprites/Speedometer/speedometer.png")
|
|
|
|
preload("res://Shaders/deliveryMarker.gdshader")
|
|
|
|
preload("res://Shaders/Fire.gdshader")
|
|
|
|
preload("res://Shaders/Snow.gdshader")
|
|
|
|
preload("res://Shaders/Transition.gdshader")
|
|
|
|
preload("res://Materials/candyCaneRing.tres")
|
|
|
|
preload("res://Materials/deliveryMarker.tres")
|
|
|
|
preload("res://Materials/Light.tres")
|
|
|
|
preload("res://Materials/stuck.tres")
|
|
|
|
|
|
|
|
func _ready() -> void:
|
2024-12-18 16:35:26 -05:00
|
|
|
get_tree().root.add_child.call_deferred(load("res://Scenes/UI/FPSCounter.tscn").instantiate())
|
2024-12-31 23:31:28 -05:00
|
|
|
await get_tree().create_timer(0.1).timeout
|
|
|
|
$Scene/CompileShaders.queue_free()
|
2024-12-18 16:35:26 -05:00
|
|
|
|
|
|
|
func _on_play_pressed():
|
|
|
|
get_tree().root.add_child(load("res://Scenes/Gameplay/City.tscn").instantiate())
|
|
|
|
queue_free()
|