1
0
Fork 0
This repository has been archived on 2025-09-12. You can view files and clone it, but cannot push or open issues or pull requests.
honest-jam-3/game/Game.gd

35 lines
993 B
GDScript

# Copyright 2021 Outfrost
# This work is free software. It comes without any warranty, to the extent
# permitted by applicable law. You can redistribute it and/or modify it under
# the terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See the LICENSE file for more details.
class_name Game
extends Node
onready var main_menu: Control = $UI/MainMenu
onready var transition_screen: TransitionScreen = $UI/TransitionScreen
onready var dialogue: Dialogue = $Dialogue
var debug: Reference
func _ready() -> void:
if OS.has_feature("debug"):
var debug_script = load("res://debug.gd")
if debug_script:
debug = debug_script.new(self)
debug.startup()
main_menu.connect("start_game", self, "on_start_game")
func _process(delta: float) -> void:
if Input.is_action_just_pressed("menu"):
back_to_menu()
func on_start_game() -> void:
main_menu.hide()
dialogue.start()
func back_to_menu() -> void:
dialogue.reset()
main_menu.show()