Kaynağa Gözat

Fix the "Example lobby implementation" section of the High-level multiplayer tutorial

Correct both the GDScript and C# code examples in the "Example lobby implementation" section of the Networking/High-level multiplayer tutorial.
Mateus Elias 6 ay önce
ebeveyn
işleme
d0e6217c12

+ 2 - 0
tutorials/networking/high_level_multiplayer.rst

@@ -415,6 +415,7 @@ have loaded the game scene.
 
     func remove_multiplayer_peer():
         multiplayer.multiplayer_peer = null
+        players.clear()
 
 
     # When the server decides to start the game from a UI scene,
@@ -550,6 +551,7 @@ have loaded the game scene.
         private void RemoveMultiplayerPeer()
         {
             Multiplayer.MultiplayerPeer = null;
+            _players.Clear();
         }
 
         // When the server decides to start the game from a UI scene,