Esempio n. 1
0
        public void SendMapInfo(long connectionId)
        {
            if (!IsServer || CurrentMapInfo == null)
            {
                return;
            }
            UpdateMapInfoMessage message = new UpdateMapInfoMessage();

            message.mapId = CurrentMapInfo.Id;
            ServerSendPacketToAllConnections(DeliveryMethod.ReliableOrdered, MsgTypes.UpdateMapInfo, message);
        }
Esempio n. 2
0
        protected virtual void HandleUpdateMapInfoAtClient(LiteNetLibMessageHandler messageHandler)
        {
            // Don't set map info again at server
            if (IsServer)
            {
                return;
            }
            UpdateMapInfoMessage message = messageHandler.ReadMessage <UpdateMapInfoMessage>();

            SetMapInfo(message.mapId);
        }