예제 #1
0
        public TestProgram()
        {
            string s = CWConsole.Singleton.TextLog;

            AvailableConfigurations availableConfigurations = LoadConfiguration();

            Config lastConfig;

            lastConfig = new CubeWorld.Configuration.Config();
            lastConfig.tileDefinitions = availableConfigurations.tileDefinitions;
            lastConfig.itemDefinitions = availableConfigurations.itemDefinitions;
            lastConfig.avatarDefinitions = availableConfigurations.avatarDefinitions;
            lastConfig.dayInfo = availableConfigurations.dayInfos[0];
            lastConfig.worldGenerator = availableConfigurations.worldGenerators[0];
            lastConfig.worldSize = availableConfigurations.worldSizes[0];
            lastConfig.extraMaterials = availableConfigurations.extraMaterials;
            lastConfig.gameplay = GameplayFactory.AvailableGameplays[0];

            CubeWorld.World.CubeWorld world = new CubeWorld.World.CubeWorld(this, this);
            GeneratorProcess worldGeneratorProcess = world.Generate(lastConfig);

            while (worldGeneratorProcess.Generate() == false)
            {

            }

            Console.WriteLine("World generated");
        }
예제 #2
0
        public TestProgram()
        {
            string s = CWConsole.Singleton.TextLog;

            AvailableConfigurations availableConfigurations = LoadConfiguration();

            Config lastConfig;

            lastConfig = new CubeWorld.Configuration.Config();
            lastConfig.tileDefinitions   = availableConfigurations.tileDefinitions;
            lastConfig.itemDefinitions   = availableConfigurations.itemDefinitions;
            lastConfig.avatarDefinitions = availableConfigurations.avatarDefinitions;
            lastConfig.dayInfo           = availableConfigurations.dayInfos[0];
            lastConfig.worldGenerator    = availableConfigurations.worldGenerators[0];
            lastConfig.worldSize         = availableConfigurations.worldSizes[0];
            lastConfig.extraMaterials    = availableConfigurations.extraMaterials;
            lastConfig.gameplay          = GameplayFactory.AvailableGameplays[0];

            CubeWorld.World.CubeWorld world = new CubeWorld.World.CubeWorld(this, this);
            GeneratorProcess          worldGeneratorProcess = world.Generate(lastConfig);

            while (worldGeneratorProcess.Generate() == false)
            {
            }

            Console.WriteLine("World generated");
        }