示例#1
0
        public MakeMapSDK()
        {
            #region initialize props

            ColorArea = new ColorAreas();
            ColorMountains = new MountainsAreas();
            ColorCoast = new ColorAreas();

            Items = new ItemsAll();
            ItemsCoasts = new CoastsAll();
            Smooths = new SmoothsAll();

            TextureArea = new TextureArea();
            SmoothTextures = new SmoothTextures();
            Cliffs = new Cliffs();

            #endregion
        }
示例#2
0
        public MakeMapSDK(string directory)
        {
            #region initialize props

            ColorArea = new ColorAreas();
            ColorMountains = new MountainsAreas();

            Items = new ItemsAll();
            ItemsCoasts = new CoastsAll();
            Smooths = new SmoothsAll();

            TextureArea = new TextureArea();
            SmoothTextures = new SmoothTextures();
            Cliffs = new Cliffs();

            #endregion

            InitializeFactories(directory);
        }
示例#3
0
        public void Populate()
        {
            #region colorread
            FactoryColor.Read();
            ColorArea = FactoryColor.Areas;

            FactoryCoast.Read();
            ColorCoast = FactoryCoast.Area;

            FactoryMountains.Read();
            ColorMountains = FactoryMountains.Mountains;
            #endregion

            #region items

            FactoryItems.Read();
            Items = FactoryItems.Items;

            FactoryItemCoasts.Read();
            ItemsCoasts = FactoryItemCoasts.CoastsAll;

            FactorySmoothItems.Read();
            Smooths = FactorySmoothItems.SmoothsAll;

            #endregion

            #region Textures

            FactoryTextureArea.Read();
            TextureArea = FactoryTextureArea.Textures;

            FactoryTextureSmooth.Read();
            SmoothTextures = FactoryTextureSmooth.Smooth;

            FactoryCliff.Read();
            Cliffs = FactoryCliff.Cliffs;

            #endregion
        }
示例#4
0
        public void LoadBinary(string folder)
        {
            BinaryFormatter bf = new BinaryFormatter();
            List<object> objectfrom;
            using(var strema = new FileStream(Path.Combine(folder, "mapmaker.bin"),FileMode.Open))
            {
                objectfrom = (List<object>)bf.Deserialize(strema);
            }

            ColorArea = (ColorAreas)objectfrom[0];
            ColorCoast = (ColorAreas) objectfrom[1];
            ColorMountains = (MountainsAreas)objectfrom[2];

            Items = (ItemsAll) objectfrom[3];
            ItemsCoasts = (CoastsAll)objectfrom[4];
            Smooths = (SmoothsAll) objectfrom[5];

            TextureArea = (TextureArea) objectfrom[6];
            SmoothTextures = (SmoothTextures) objectfrom[7];
            Cliffs = (Cliffs) objectfrom[8];
        }
示例#5
0
        public MakeMapSDK(string directory)
        {
            #region initialize props

            ColorArea = new ColorAreas();
            ColorMountains = new MountainsAreas();

            Items = new ItemsAll();
            ItemsCoasts = new CoastsAll();
            Smooths = new SmoothsAll();


            TextureArea = new TextureArea();
            SmoothTextures = new SmoothTextures();
            Cliffs = new Cliffs();

            #endregion

            #region initialize Factories

            Factories = new List<Factory>();

            FactoryColor = new FactoryColorArea(Path.Combine(directory, "color_area.txt"));

            Factories.Add(FactoryColor);

            FactoryCoast = new FactoryCoast(Path.Combine(directory, "color_coast.txt"));

            Factories.Add(FactoryCoast);

            FactoryMountains = new FactoryMountains(Path.Combine(directory, "color_mntn.txt"));

            Factories.Add(FactoryMountains);

            FactoryItems = new FactoryItems(Path.Combine(directory, "items.txt"));

            Factories.Add(FactoryItems);

            FactoryItemCoasts = new FactoryItemCoasts(Path.Combine(directory, "ite_tex_coast.txt"));

            Factories.Add(FactoryItemCoasts);

            FactorySmoothItems = new FactorySmoothItems(Path.Combine(directory, "items_smooth.txt"));

            Factories.Add(FactorySmoothItems);

            FactoryTextureArea = new FactoryTextureArea(Path.Combine(directory, "texture_area.txt"));

            Factories.Add(FactoryTextureArea);

            FactoryTextureSmooth = new FactoryTextureSmooth(Path.Combine(directory, "texture_smooth.txt"));

            Factories.Add(FactoryTextureSmooth);

            FactoryCliff = new FactoryCliff(Path.Combine(directory, "texture_cliff.txt"));

            Factories.Add(FactoryCliff);

            #endregion

        }
 public FactoryTextureArea(string location)
     : base(location)
 {
     Textures = new TextureArea();
 }