Example #1
0
 // Загрузка объектов сцены
 public static void Load()
 {
     MapPlanets     = new List <Planet>();
     FTechShips     = new TechInfo[Enum.GetValues(typeof(ShipType)).Length, Enum.GetValues(typeof(ShipTech)).Length];
     FTechBuildings = new TechInfo[Enum.GetValues(typeof(BuildingType)).Length, Enum.GetValues(typeof(BuildingTech)).Length];
     InfoBuildings  = new BuildingInfo[(int)BuildingType.Empty];
     InfoShips      = new ShipInfo[(int)ShipType.Empty];
     ShipGroup      = new ShipGroup();
     SocketReader   = new SocketReader();
     SocketWriter   = new SocketWriter();
     MapPlanets.Clear();
 }
Example #2
0
        public void ShipMoveToGroup(ShipGroup AGroup)
        {
            BinaryWriter LWriter = DoOpen(C_SHIP_MOVE_TO_GROUP);

            LWriter.Write(AGroup.Planets.Count);
            LWriter.Write(AGroup.Ships.Count);
            foreach (Planet LPLanet in AGroup.Planets)
            {
                LWriter.Write(LPLanet.UID);
            }
            foreach (Ship LShip in AGroup.Ships)
            {
                LWriter.Write(LShip.UID);
            }
            DoClose(LWriter);
        }