public override void LoadContent() { if (this.content == null) { this.content = new ContentManager(this.ScreenManager.Game.Services, "Content"); } this.background = new ScrollingEnvironment( this.content.Load<Texture2D>("Environment/background"), this.scrollVelocity, this.ScreenManager.GraphicsDevice.Viewport.Width); this.foreground = new ScrollingEnvironment( this.content.Load<Texture2D>("Environment/foreground"), this.scrollVelocity * 2, this.ScreenManager.GraphicsDevice.Viewport.Width); this.clouds = new ScrollingEnvironment( this.content.Load<Texture2D>("Environment/clouds"), this.scrollVelocity * 3, this.ScreenManager.GraphicsDevice.Viewport.Width); this.menuBackdropArea = new Rectangle( this.ScreenManager.GraphicsDevice.Viewport.Width / 8, 0, this.ScreenManager.GraphicsDevice.Viewport.Width / 4, this.ScreenManager.GraphicsDevice.Viewport.Height); }
public override void LoadContent() { if (this.content == null) { this.content = new ContentManager(this.ScreenManager.Game.Services, "Content"); } // Create players this.players.Add(new Player(this.content.Load<Texture2D>("Character/redWizard"), this.content.Load<Texture2D>("General/fireBall"), new Vector2(500, 300), 100, 0.5f)); this.players.Add(new Player(this.content.Load<Texture2D>("Character/blueWizard"), this.content.Load<Texture2D>("General/iceShard"), new Vector2(500, 280), 100, 0.5f)); this.entities.AddRange(this.players); // Create scrolling environment for level. this.background = new ScrollingEnvironment( this.content.Load<Texture2D>("Environment/background"), this.scrollVelocity, this.ScreenManager.GraphicsDevice.Viewport.Width); this.foreground = new ScrollingEnvironment( this.content.Load<Texture2D>("Environment/foreground"), this.scrollVelocity * 1.5f, this.ScreenManager.GraphicsDevice.Viewport.Width); this.clouds = new ScrollingEnvironment( this.content.Load<Texture2D>("Environment/clouds"), this.scrollVelocity * 2, this.ScreenManager.GraphicsDevice.Viewport.Width); this.ScreenManager.Game.ResetElapsedTime(); this.TempMakeEnemy(); }