Exemplo n.º 1
0
        /// <summary>
        /// called by rooms when a player finishes connecting
        /// </summary>
        internal void FinishedRoomSwitch()
        {
#if DEBUG
            Debug.Log($"Finished switching {this}");
#endif
            //update our actual room
            _currentRoom     = _switchingToRoom;
            _switchingToRoom = Guid.Empty;
            Room.MovePlayerCount(Server, _oldRoom, _currentRoom);
            _oldRoom = Guid.Empty;
            //and synchronize data
            SynchNetData();
            FinishedSwitchingRooms?.Invoke(Server.GetRoom(_currentRoom));
        }