/// <summary> /// Initializes the game. /// </summary> /// <param name="launchParameters">The LaunchParameters.</param> /// <returns>EngineConfiguration.</returns> public override EngineConfiguration OnInitialize(LaunchParameters launchParameters) { _resolution = "640x480"; if (launchParameters.KeyAvailable("Resolution")) { _resolution = launchParameters["Resolution"]; } var waveOutInitializer = new WaveOutInitializer(); if (!waveOutInitializer.IsSupported) { MessageBox.Show("WaveOut wird nicht supported. Das Spiel wird ohne Ton gestartet.", "FlyingBird", MessageBoxButtons.OK, MessageBoxIcon.Information); } if (launchParameters.KeyAvailable("Device")) { switch (launchParameters["Device"]) { case "DirectX9": _deviceHint = "DirectX9"; return new EngineConfiguration( new DirectXRenderDevice(), waveOutInitializer.IsSupported ? waveOutInitializer : null); case "DirectX10": _deviceHint = "DirectX10"; return new EngineConfiguration( new Sharpex2D.Rendering.DirectX10.DirectXRenderDevice(), waveOutInitializer.IsSupported ? waveOutInitializer : null); case "DirectX11": _deviceHint = "DirectX11"; return new EngineConfiguration( new Sharpex2D.Rendering.DirectX11.DirectXRenderDevice(), waveOutInitializer.IsSupported ? waveOutInitializer : null); case "GDI+": _deviceHint = "GDI+ :<("; return new EngineConfiguration(new GDIRenderDevice(), waveOutInitializer.IsSupported ? waveOutInitializer : null); } } _deviceHint = "DirectX11"; return new EngineConfiguration( new Sharpex2D.Rendering.DirectX11.DirectXRenderDevice(), waveOutInitializer.IsSupported ? waveOutInitializer : null); }
/// <summary> /// The on initialize. /// </summary> /// <param name="launchParameters"> /// The launch parameters. /// </param> /// <returns> /// The <see cref="EngineConfiguration"/>. /// </returns> public override EngineConfiguration OnInitialize(LaunchParameters launchParameters) { this.GameComponentManager.Add(this.SceneManager); return new EngineConfiguration(new DirectXRenderDevice() , new WaveOutInitializer()); }
public override EngineConfiguration OnInitialize(LaunchParameters launchParameters) { this.GameComponentManager.Add(this.SceneManager); return new EngineConfiguration(new Rendering.DirectX11.DirectXGraphicsManager()); }
/// <summary> /// Restarts the Game with the specified LaunchParameters. /// </summary> /// <param name="launchParameters">The LaunchParameters.</param> public void Restart(LaunchParameters launchParameters) { SGL.Restart(launchParameters.ToString()); }
/// <summary> /// Processes the Game initialization. /// </summary> /// <param name="launchParameters">The LaunchParameters.</param> public abstract EngineConfiguration OnInitialize(LaunchParameters launchParameters);
/// <summary> /// Initializes the game. /// </summary> /// <param name="launchParameters">The LaunchParameters.</param> /// <returns>EngineConfiguration.</returns> public override EngineConfiguration OnInitialize(LaunchParameters launchParameters) { return new EngineConfiguration(new OpenGLGraphicsManager(), new WaveOutInitializer()); }