1
0
mirror of https://github.com/JohnBreaux/Boat-Battle.git synced 2025-02-04 12:28:35 +00:00

Merge branch 'game-logic' of github.com:StatewideInk/Group12 into game-logic

This commit is contained in:
2021-11-22 23:17:33 -06:00
5 changed files with 155 additions and 24 deletions

View File

@@ -4,6 +4,7 @@ extends Control
onready var Title_Screen = preload("res://scenes/Title Screen.tscn")
onready var Game = preload("res://scenes/Game/Game.tscn" )
onready var Options = preload("res://scenes/Options.tscn" )
onready var Credits = preload("res://scenes/Credits.tscn" )
onready var Debug_Menu = preload("res://scenes/Debug Menu.tscn" )
# Themes
@@ -71,6 +72,10 @@ func _on_scene_start(scene):
instance = Options.instance()
add_child (instance)
return true
"Credits":
instance = Credits.instance()
add_child (instance)
return true
"Title":
instance = Title_Screen.instance()
add_child (instance)

View File

@@ -0,0 +1,21 @@
extends Control
var light_theme = load("res://light_theme.tres")
var dark_theme = load("res://dark_theme.tres")
# Called when the node enters the scene tree for the first time.
func _ready():
var _errno = 0;
_errno += OptionsController.connect("change_theme", self, "_on_change_theme")
_on_change_theme(OptionsController.get_theme())
func _on_Back_pressed():
AudioBus.emit_signal("button_clicked")
queue_free()
pass # Replace with function body.
func _on_change_theme(theme):
if theme == "light":
self.set_theme(light_theme)
elif theme == "dark":
self.set_theme(dark_theme)

View File

@@ -25,6 +25,11 @@ func _on_Options_pressed():
MessageBus.emit_signal("change_scene", "Options")
queue_free()
func _on_Credits_pressed():
AudioBus.emit_signal("button_clicked")
MessageBus.emit_signal("change_scene", "Credits")
queue_free()
func _on_Quit_pressed():
AudioBus.emit_signal("button_clicked")
MessageBus.emit_signal("quit")