Exemple #1
0
        public void InitializeFactories(string directory)
        {
            #region initialize Factories

            FolderLocation = directory;

            Factories = new List<Factory>();

            try
            {
                FactoryColor = new FactoryColorArea(Path.Combine(directory, "color_area.txt"));
            }
            catch (Exception)
            {

            }
            if (FactoryColor != null)
                Factories.Add(FactoryColor);

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

            }
            catch (Exception)
            {

            }
            if (FactoryCoast != null)
                Factories.Add(FactoryCoast);

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

            }
            catch (Exception)
            {
            }
            if (FactoryMountains != null)
                Factories.Add(FactoryMountains);

            try
            {
                FactoryItems = new FactoryItems(Path.Combine(directory, "items.txt"));
            }
            catch (Exception)
            {
            }
            if (FactoryItems != null)
                Factories.Add(FactoryItems);

            try
            {
                FactoryItemCoasts = new FactoryItemCoasts(Path.Combine(directory, "ite_tex_coast.txt"));
            }
            catch (Exception)
            {
            }
            if (FactoryItemCoasts != null)
                Factories.Add(FactoryItemCoasts);

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

            }
            catch (Exception)
            {
            }
            if (FactorySmoothItems != null)
                Factories.Add(FactorySmoothItems);

            try
            {
                FactoryTextureArea = new FactoryTextureArea(Path.Combine(directory, "texture_area.txt"));
            }
            catch (Exception)
            {
            }
            if (FactoryTextureArea != null)
                Factories.Add(FactoryTextureArea);

            try
            {
                FactoryTextureSmooth = new FactoryTextureSmooth(Path.Combine(directory, "texture_smooth.txt"));
            }
            catch (Exception)
            {
            }
            if (FactoryTextureSmooth != null)
                Factories.Add(FactoryTextureSmooth);

            try
            {
                FactoryCliff = new FactoryCliff(Path.Combine(directory, "texture_cliff.txt"));
            }
            catch (Exception)
            {
            }
            if (FactoryCliff != null)
                Factories.Add(FactoryCliff);

            #endregion
        }
Exemple #2
0
        public MapSdk(string directory)
        {
            #region initialize props

            CollectionColorArea = new CollectionAreaColor();
            CollectionColorMountains = new CollectionAreaColorMountains();

            CollectionAreaItems = new CollectionAreaItems();
            CollectionAreaItemsCoasts = new CollectionAreaTransitionItemCoast();
            CollectionAreaTransitionItems = new CollectionAreaTransitionItems();


            CollectionAreaTexture = new CollectionAreaTexture();
            CollectionAreaTransitionTexture = new CollectionAreaTransitionTexture();
            CollectionAreaTransitionCliffTexture = new CollectionAreaTransitionCliffTexture();

            #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

        }