示例#1
0
 public void SendBuildingAddedInformationUpdateToAll()
 {
     if (CanSendMessage)
     {
         NetOutgoingMessage msg = netServer.CreateMessage();
         msg.Write((int)MPMessageType.BuildingAddedUpdate);
         msg.Write(ConvertionHelper.ConvertToByteArray(SkylinesOverwatch.Data.Instance.BuildingsAdded));
     }
 }
示例#2
0
        public static ushort CreateBuilding(ushort mpID, Building building)
        {
            ConvertionHelper.ConvertToByteArray(building);
            ushort gotID;

            BuildingManager.instance.CreateBuilding(out gotID, ref SimulationManager.instance.m_randomizer, building.Info, building.m_position, building.m_angle, building.Length, building.m_buildIndex);
            if (!syncedBuildingDict.ContainsKey(gotID))
            {
                syncedBuildingDict.Add(gotID, mpID);
            }
            return(gotID);
        }