feat: Add initial gridmap mesh library, main game script, and Nakama manager.
This commit is contained in:
@@ -102,6 +102,14 @@ func join_game(match_id: String):
|
||||
if not bridge:
|
||||
printerr("Cannot join: Bridge not initialized")
|
||||
return
|
||||
|
||||
# If already connected, leave current match first
|
||||
if bridge.multiplayer_peer.get_connection_status() == MultiplayerPeer.CONNECTION_CONNECTED:
|
||||
print("Already connected to a match. Leaving current match before joining...")
|
||||
bridge.leave()
|
||||
# Wait a bit for cleanup
|
||||
await get_tree().create_timer(0.2).timeout
|
||||
|
||||
print("Joining match: ", match_id)
|
||||
var result = await bridge.join_match(match_id)
|
||||
if result and result.is_exception():
|
||||
|
||||
Reference in New Issue
Block a user