protected override void CreateFrameBuffer() { base.CreateFrameBuffer(); GL.Viewport(0, 0, Size.Width, Size.Height); game = new LightingProject.Game(); adapter = new WaveEngine.Adapter.Adapter(this, window, Size.Height, Size.Width); adapter.DefaultOrientation = DisplayOrientation.LandscapeLeft; adapter.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight; game.Initialize(adapter); lastTime = DateTime.Now; }
public override void Initialize() { this.game = new LightingProject.Game(); this.game.Initialize(this); #region WAVE SOFTWARE LICENSE AGREEMENT this.backgroundSplashColor = new Color("#ebebeb"); this.spriteBatch = new SpriteBatch(WaveServices.GraphicsDevice); var resourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames(); string name = string.Empty; foreach (string item in resourceNames) { if (item.Contains("SplashScreen.wpk")) { name = item; break; } } if (string.IsNullOrWhiteSpace(name)) { throw new InvalidProgramException("License terms not agreed."); } using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name)) { this.splashScreen = WaveServices.Assets.Global.LoadAsset <Texture2D>(name, stream); } position = new Vector2(); position.X = (this.Width / 2.0f) - (this.splashScreen.Width / 2.0f); position.Y = (this.Height / 2.0f) - (this.splashScreen.Height / 2.0f); #endregion }
public override void Initialize() { this.game = new LightingProject.Game(); this.game.Initialize(this); #region WAVE SOFTWARE LICENSE AGREEMENT this.backgroundSplashColor = new Color(32, 32, 32, 255); this.spriteBatch = new SpriteBatch(WaveServices.GraphicsDevice); var resourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames(); string name = string.Empty; foreach (string item in resourceNames) { if (item.Contains("SplashScreen.wpk")) { name = item; break; } } if (string.IsNullOrWhiteSpace(name)) { throw new InvalidProgramException("License terms not agreed."); } using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name)) { this.splashScreen = WaveServices.Assets.Global.LoadAsset<Texture2D>(name, stream); } position = new Vector2(); position.X = (this.Width / 2.0f) - (this.splashScreen.Width / 2.0f); position.Y = (this.Height / 2.0f) - (this.splashScreen.Height / 2.0f); #endregion }
protected override void CreateFrameBuffer() { base.CreateFrameBuffer(); GL.Viewport(0, 0, Size.Width, Size.Height); game = new LightingProject.Game(); adapter = new WaveEngine.Adapter.Adapter(this, window, Size.Height, Size.Width); adapter.DefaultOrientation = DisplayOrientation.LandscapeLeft; adapter.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight; game.Initialize(adapter); lastTime = DateTime.Now; }