/// <summary>
        /// Attempts to initialise view based on Arena2Path
        /// </summary>
        /// <returns></returns>
        private bool InitialiseView()
        {
            // Exit if not created or Arena2 is not set
            if (!this.Created || string.IsNullOrEmpty(arena2Path))
            {
                return(false);
            }

            // Create engine core
            core = new DeepCore(arena2Path, base.Services);
            core.Initialize();

            // Set options
            core.Renderer.ShowDebugBuffers = false;
            core.Renderer.FXAAEnabled      = false;
            core.Renderer.BloomEnabled     = false;

            // Hook idle event to run as fast as possible
            Application.Idle += TickWhileIdle;

            // Set ready flag
            isReady = true;

            // Raise event
            InitializeCompleted(this, null);

            return(true);
        }
예제 #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            core.Initialize();

            base.Initialize();
        }
예제 #3
0
        /// <summary>
        /// Initialise game engine.
        /// </summary>
        protected override void Initialize()
        {
            // Initialise core
            core.Initialize();

            // Assign settings
            core.Input.InvertMouseLook = invertMouseVertical;
            core.Renderer.FXAAEnabled  = fxaaEnabled;
            core.Renderer.BloomEnabled = bloomEnabled;

            base.Initialize();

            // Toggle fullscreen
            if (displayPreference == DisplayPreferences.Fullscreen)
            {
                graphics.ToggleFullScreen();
            }
        }