Пример #1
0
 public void ChangeModel(StructureChangeMsg msg)
 {
     structures[msg.from] = msg;
     KeyValuePair <int, PlayerData>[] players = users.ToArray();
     foreach (KeyValuePair <int, PlayerData> playerData in players)
     {
         //Debug.Log("StructChange");
         msg.to = playerData.Value.clientData.id;
         Send(msg.GetBytes(), playerData.Value.clientData.id);
     }
 }
Пример #2
0
 public int AddModel(StructureChangeMsg msg)
 {
     msg.from = structCount;
     structures.Add(structCount, msg);
     return(structCount++);
 }