Exemplo n.º 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            Config();

            Globals.Game = this;

            Menu.EditorData.Load(Globals.EditorDataSaveDir);

            DrawBox.InitializeDefaultServices(this, graphics, defaultSkin);

            DrawBox.KeyboardInput.Enabled = false;
            DrawBox.MouseInput.Enabled    = false;

            var guiManager = new GUIManager(this);

            guiManager.Initialize();
            guiManager.Enabled = false;
            guiManager.Visible = false;
            Services.AddService(typeof(GUIManager), guiManager);
            Globals.GUIManager = guiManager;

            Push.InitializeServices(DrawBox.Debug);

            Globals.Random         = new EvoSim.RandomNumberGenerators.UniformRandomGenerator();
            Globals.GaussianRandom = new EvoSim.RandomNumberGenerators.NormalRandomGenerator(0, 1000, Globals.Random);             //Initialize the Gaussian with the same random nubmer generator.

            Pseudo.Static_Random         = Globals.Random;
            Pseudo.Static_GaussianRandom = Globals.GaussianRandom;

            //StateManager.Push(new States.InitializeState(), new GameTime());
            StateManager.Push(new States.InitializeState(), new GameTime());
        }