Пример #1
0
        private void SetGenerator()
        {
            int?cur_seed = null;

            if (use_seed)
            {
                cur_seed = seed;
            }

            switch (type)
            {
            case GeneratorType.CANYON:
                generator = new CanyonGenerator(cur_seed);
                break;

            case GeneratorType.COASTAL_MOUNTAIN:
                generator = new CoastalMountainGenerator(cur_seed);
                break;

            default:
                generator = new CoastalMountainGenerator(cur_seed);
                break;
            }

            generator.UseMap(map);
        }
        private void SetGenerator()
        {
            if (use_seed)
            {
                switch (type)
                {
                case GeneratorType.CANYON:
                    generator = new CanyonGenerator(seed);
                    break;

                case GeneratorType.COASTAL_MOUNTAIN:
                    generator = new CoastalMountainGenerator(seed);
                    break;

                default:
                    generator = new CoastalMountainGenerator(seed);
                    break;
                }
            }
            else
            {
                switch (type)
                {
                case GeneratorType.CANYON:
                    generator = new CanyonGenerator();
                    break;

                case GeneratorType.COASTAL_MOUNTAIN:
                    generator = new CoastalMountainGenerator();
                    break;

                default:
                    generator = new CoastalMountainGenerator();
                    break;
                }
            }

            generator.UseMap(map);
        }