Move files and folders to new repo format to enable multi-project format

This commit is contained in:
2025-03-06 22:07:25 -08:00
parent 12cbb82ac9
commit a09f6ec5a5
3973 changed files with 1781 additions and 2938 deletions

View File

@@ -0,0 +1,24 @@
class_name RandomNumberMultiplayer
extends Node
## Can be used to seed the DungeonGenerator to sync the seed with all clients on multiplayer
# Connect to DungeonGenerator generate(seed) function
signal got_random_int(num : int)
var random_number : int
func _ready():
if is_multiplayer_authority():
random_number = randi()
emit_random_number(random_number)
else:
request_random_number.rpc_id(get_multiplayer_authority())
@rpc("authority", "call_remote", "reliable", 0)
func emit_random_number(num : int):
got_random_int.emit(num)
@rpc("any_peer", "call_remote", "reliable", 0)
func request_random_number():
emit_random_number.rpc_id(multiplayer.get_remote_sender_id(), random_number)