Push project up

This commit is contained in:
2026-08-23 12:38:19 -05:00
parent a348e975e3
commit dcd3b0525c
45 changed files with 1429 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=5 format=3 uid="uid://dy51wny4x53f4"]
[ext_resource type="Script" uid="uid://b808va021l1w7" path="res://scripts/data/game_data.gd" id="1_hulqm"]
[ext_resource type="Script" uid="uid://cai8lpy7e00d6" path="res://scripts/data/game_state.gd" id="2_6ash1"]
[ext_resource type="Script" uid="uid://cihlohg5ouy6q" path="res://scripts/data/lobby_data.gd" id="3_80q4n"]
[ext_resource type="Script" uid="uid://dof720ujunrw8" path="res://scripts/data/multiplayer_data.gd" id="4_setx2"]
[node name="data_bridge" type="Node"]
[node name="game_data" type="Node" parent="."]
script = ExtResource("1_hulqm")
[node name="game_state" type="Node" parent="."]
script = ExtResource("2_6ash1")
[node name="lobby_data" type="Node" parent="."]
script = ExtResource("3_80q4n")
[node name="multiplayer_data" type="Node" parent="."]
script = ExtResource("4_setx2")

View File

@@ -0,0 +1,5 @@
class_name GameData extends Node
func _ready() -> void:
Globals.game_data = self

View File

@@ -0,0 +1 @@
uid://b808va021l1w7

View File

@@ -0,0 +1,32 @@
class_name GameState extends Node
func _ready() -> void:
Globals.game_state = self
func load_game_scene(scene_str: String) -> void:
var scene = load(scene_str).instantiate()
var target = get_tree().root.get_node("shell/scene")
target.add_child(scene)
func set_game_scene(scene_str: String) -> void:
var scene = load(scene_str).instantiate()
var target = get_tree().root.get_node("shell/scene")
if "game" in scene_str:
scene.name = "game"
elif "lobby" in scene_str:
scene.name = "lobby_screen"
elif "start" in scene_str:
scene.name = "start_screen"
clear_game_scene(target)
target.add_child(scene)
func clear_game_scene(container: Node) -> void:
for child in container.get_children():
child.queue_free()
await get_tree().process_frame

View File

@@ -0,0 +1 @@
uid://cai8lpy7e00d6

View File

@@ -0,0 +1,5 @@
class_name LobbyData extends Node
func _init() -> void:
Globals.lobby_data = self

View File

@@ -0,0 +1 @@
uid://cihlohg5ouy6q

View File

@@ -0,0 +1,13 @@
class_name MultiplayerData extends Node
var is_multiplayer_active: bool = false
var multiplayer_synchronizer: MultiplayerSynchronizer = MultiplayerSynchronizer.new()
var synchronizer_config: SceneReplicationConfig = SceneReplicationConfig.new()
func _ready() -> void:
Globals.multiplayer_data = self
multiplayer_synchronizer.name = "multiplayer_synchronizer"
multiplayer_synchronizer.replication_config = synchronizer_config
multiplayer_synchronizer.root_path = "/root/shell"

View File

@@ -0,0 +1 @@
uid://dof720ujunrw8