/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); //21/35 sample_image = new SpriteSheet(Content.Load <Texture2D>("sprites/commandos"), spriteBatch, 21, 35); sample_tile = new SpriteSheet(Content.Load <Texture2D>("sprites/green_tile20x20"), spriteBatch, 20, 20); sample_util = new SpriteSheet(Content.Load <Texture2D>("sprites/util_misc20x20"), spriteBatch, 20, 20); menuUI = new SpriteSheet(Content.Load <Texture2D>("gamePlayUI/menuUI"), spriteBatch, 299, 211); iconUI = new SpriteSheet(Content.Load <Texture2D>("gamePlayUI/icons"), spriteBatch, 208, 51); gamePlayMenu = new ViewGamePlayMenu(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight, menuUI); gamePlayMenu.loadIconSprite(iconUI); gameSelectView.loadSpriteSheet(sample_util); gameView = new View(800, 600, spriteBatch); gameView.LoadScenario(this.testGameController.scenario); gamePlayMenu.LoadScenario(this.testGameController.scenario); gameView.LoadMap(this.testGameController.gameWorld); gameView.LoadSpriteSheet(sample_tile); gameView.LoadUnitsSpriteSheet(sample_image); gameView.LoadUtilitySpriteSheet(sample_util); gameView.LoadBuildingSpriteSheet(new SpriteSheet(Content.Load <Texture2D>("gameBuildings/sample_build"), spriteBatch, 40, 40)); testGameController.registerObserver(gameSelectView); // TODO: use this.Content to load your game content here }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); //21/35 sample_image = new SpriteSheet(Content.Load <Texture2D>("sprites/commandos"), spriteBatch, 21, 35); sample_tile = new SpriteSheet(Content.Load <Texture2D>("sprites/green_tile20x20"), spriteBatch, 20, 20); sample_util = new SpriteSheet(Content.Load <Texture2D>("sprites/util_misc20x20"), spriteBatch, 20, 20); gameView = new View(40, 40, spriteBatch); gameView.LoadScenario(this.testGameController.scenario); gameView.LoadMap(this.testGameController.gameWorld); gameView.LoadSpriteSheet(sample_tile); gameView.LoadUnitsSpriteSheet(sample_image); gameView.LoadUtilitySpriteSheet(sample_util); // TODO: use this.Content to load your game content here }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); //21/35 sample_image = new SpriteSheet(Content.Load<Texture2D>("sprites/commandos"), spriteBatch, 21, 35); sample_tile = new SpriteSheet(Content.Load<Texture2D>("sprites/green_tile20x20"), spriteBatch, 20, 20); sample_util = new SpriteSheet(Content.Load<Texture2D>("sprites/util_misc20x20"), spriteBatch, 20, 20); gameSelectView.loadSpriteSheet(sample_util); gameView = new View(40, 40, spriteBatch); gameView.LoadScenario(this.testGameController.scenario); gameView.LoadMap(this.testGameController.gameWorld); gameView.LoadSpriteSheet(sample_tile); gameView.LoadUnitsSpriteSheet(sample_image); gameView.LoadUtilitySpriteSheet(sample_util); testGameController.registerObserver(gameSelectView); // TODO: use this.Content to load your game content here }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); //21/35 sample_image = new SpriteSheet(Content.Load<Texture2D>("sprites/commandos"), spriteBatch, 21, 35); sample_tile = new SpriteSheet(Content.Load<Texture2D>("sprites/green_tile20x20"), spriteBatch, 20, 20); sample_util = new SpriteSheet(Content.Load<Texture2D>("sprites/util_misc20x20"), spriteBatch, 20, 20); menuUI = new SpriteSheet(Content.Load<Texture2D>("gamePlayUI/menuUI"), spriteBatch, 299, 211); iconUI = new SpriteSheet(Content.Load<Texture2D>("gamePlayUI/icons"), spriteBatch, 208, 51); gamePlayMenu = new ViewGamePlayMenu(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight,menuUI); gamePlayMenu.loadIconSprite(iconUI); gameSelectView.loadSpriteSheet(sample_util); gameView = new View(800,600, spriteBatch); gameView.LoadScenario(this.testGameController.scenario); gamePlayMenu.LoadScenario(this.testGameController.scenario); gameView.LoadMap(this.testGameController.gameWorld); gameView.LoadSpriteSheet(sample_tile); gameView.LoadUnitsSpriteSheet(sample_image); gameView.LoadUtilitySpriteSheet(sample_util); gameView.LoadBuildingSpriteSheet(new SpriteSheet(Content.Load<Texture2D>("gameBuildings/sample_build"), spriteBatch, 40, 40)); testGameController.registerObserver(gameSelectView); // TODO: use this.Content to load your game content here }