Ejemplo n.º 1
0
 internal void GenMap(int width, int height, int length, int seed, IMapGenerator generator)
 {
     game.World.Reset();
     GC.Collect();
     this.generator = generator;
     game.SetNewScreen(new LoadingMapScreen(game, "Generating level", "Generating.."));
     generator.GenerateAsync(game, width, height, length, seed);
 }
Ejemplo n.º 2
0
        public override void Init()
        {
            game.World.Reset();
            Events.RaiseOnNewMap();
            GC.Collect();

            base.Init();
            gen.GenerateAsync(game);
        }
Ejemplo n.º 3
0
        internal void BeginGeneration(int width, int height, int length, int seed, IMapGenerator gen)
        {
            game.World.Reset();
            game.WorldEvents.RaiseOnNewMap();

            GC.Collect();
            this.gen = gen;
            game.Gui.SetNewScreen(new GeneratingMapScreen(game, gen));
            gen.Width = width; gen.Height = height; gen.Length = length; gen.Seed = seed;
            gen.GenerateAsync(game);
        }