Overhauled camera

This commit is contained in:
Sch1nken 2024-03-23 16:18:30 +01:00
parent 5fe8f22ccb
commit da78e7f287
21 changed files with 385 additions and 71 deletions

56
UI/main_menu.gd Normal file
View file

@ -0,0 +1,56 @@
extends Control
@onready var exit_button = $PanelContainer/MarginContainer/VBoxContainer/ExitButton
@onready var lan_button = $PanelContainer/MarginContainer/VBoxContainer/LANButton
@onready var rules = $Rules
@onready var settings = $Settings
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
if OS.has_feature("web"):
exit_button.visible = false
lan_button.visible = false
#WSClient.lobby_joined.connect(_on_lobby_joined)
GameData.reset()
func _on_lobby_joined(lobby: String) -> void:
GameData.lobby_code = lobby
get_tree().change_scene_to_file("res://Multiplayer/Multiplayer.tscn")
func _on_host_button_pressed():
GameData.is_player_black = false
#WSClient.start(GameData.WEBSOCKET_ENDPOINT, "", false)
func _on_join_button_pressed():
get_tree().change_scene_to_file("res://UI/join_menu.tscn")
func _on_exit_button_pressed():
get_tree().quit()
func _on_rules_button_pressed():
rules.show_panel()
func _on_online_button_pressed():
pass # Replace with function body.
func _on_online_button_2_pressed():
get_tree().change_scene_to_file("res://UI/join_menu.tscn")
func _on_local_button_pressed():
GameData.is_hot_seat = true
get_tree().change_scene_to_file("res://Game.tscn")
func _on_settings_button_pressed():
settings.show_panel()
pass # Replace with function body.