Пример #1
0
 public void ReciveData(DataMap data)
 {
     if (data != null)
     {
         LastRecivedMap = data;
         foreach (string s in data.keys)
         {
             foreach (var a in clients.Where(a => a.Key == s || a.Key == s.Split(':')[0]))
             {
                 a.Value.Update(data.GetData(s), data);
             }
         }
     }
 }
Пример #2
0
 public void ReciveRaw(byte[] data)
 {
     try
     {
         Packet  pdata = Serilizer.Desrilize <Packet>(data);
         DataMap dmap  = Serilizer.Desrilize <DataMap>(pdata.data);
         dmap.AddData("GameState:PSize", pdata.length);
         dmap.AddData("GameState:Packet", "PacketSize: " + data.Length);
         dmap.AddData("GameState:FreePacket", "PacketFree: " + (data.Length - pdata.length));
         ReciveData(dmap);
     }
     catch (Exception e)
     {
         LastRecivedMap.AddData("GameState:Exception", e.Message);
         ReciveData(LastRecivedMap);
     }
 }
Пример #3
0
 public void CreateNewMap()
 {
     currentMap = new DataMap();
 }