/// <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); spriteSheet = Content.Load <Texture2D>(@"Textures\SpriteSheet"); titleScreen = Content.Load <Texture2D>(@"Textures\TitleScreen"); arialFont = Content.Load <SpriteFont>(@"Fonts\ArialFont"); Camera.WorldRectangle = new Rectangle(0, 0, 1600, 1600); Camera.ViewPortWidth = 800; Camera.ViewPortHeight = 600; TileMap.Initialize(spriteSheet); TileMap.GenerateRandomMap(); Player.Initialize(spriteSheet, new Rectangle(0, 64, 32, 32), 6, new Rectangle(0, 96, 32, 32), 1, new Vector2(32, 32)); EffectsManager.Initialize(spriteSheet, new Rectangle(0, 288, 2, 2), new Rectangle(0, 256, 32, 32), 3); WeaponManager.Texture = spriteSheet; GoalManager.Initialize(spriteSheet, new Rectangle(0, 7 * 32, 32, 32), new Rectangle(3 * 32, 7 * 32, 32, 32), 3, 1); EnemyManager.Initialize(spriteSheet, new Rectangle(0, 160, 32, 32)); }
public static void StartNewWave() { CurrentWave++; if (CurrentTerminalCount < MaxTerminalCount) { CurrentTerminalCount++; } Player.BaseSprite.WorldLocation = PlayerStartLoc; Camera.Position = Vector2.Zero; WeaponManager.CurrentWeaponType = WeaponManager.WeaponType.Normal; WeaponManager.Shots.Clear(); WeaponManager.PowerUps.Clear(); EffectsManager.Effects.Clear(); EnemyManager.Enemies.Clear(); TileMap.GenerateRandomMap(); GoalManager.GenerateComputers(CurrentTerminalCount); }