Esempio n. 1
0
 void button_OnClick(object sender, EventArgs e)
 {
     WorldConfiguration config = new WorldConfiguration();
     if(generators[0] == "FLAT")
         config.Generator = new GeneratorFlat();
     else if (generators[0] == "DEBUG")
         config.Generator = new GeneratorDebug();
     else if (generators[0] == "BIOME")
         config.Generator = new GeneratorBiome();
     TheGame.Instance.NewGame(config);
 }
Esempio n. 2
0
 internal void Initialize(WorldConfiguration config)
 {
     chunkCache          = new ChunkCache();
     storage             = new ChunkStorage();
     generator           = config.Generator;
     Player              = new Player();
     Player.PrevPosition = World.Instance.Player.Position = new Vector3(0, 100, -20);
     entityToControl     = Player;
     globalEntities.Add(new Sun());
     globalEntities.Add(new Moon());
     globalEntities.Add(Player);
 }
Esempio n. 3
0
 internal void Initialize(WorldConfiguration config)
 {
     chunkCache = new ChunkCache();
     storage = new ChunkStorage();
     generator = config.Generator;
     Player = new Player();
     Player.PrevPosition = World.Instance.Player.Position = new Vector3(0, 100, -20);
     entityToControl = Player;
     globalEntities.Add(new Sun());
     globalEntities.Add(new Moon());
     globalEntities.Add(Player);
 }
Esempio n. 4
0
 internal void NewGame(WorldConfiguration config)
 {
     World.Instance.Initialize(config);
     GlobalRenderer.Instance.InitializeWorld();
     while (Mode == GameMode.Gui)
     {
         CloseGui();
     }
     OpenGui(new GuiGenerateWorldForm());
 }