public override void Draw(GameTime gameTime) { if (Health > 0) { base.Draw(gameTime); } else { float maxExplosionTime = 0.75f; if (explosionTimer < maxExplosionTime) { TankExplosion Explosion = (TankExplosion)Game.Services.GetService(typeof(TankExplosion)); explosionTimer += (float)gameTime.ElapsedGameTime.TotalSeconds; Explosion.PixelPosition = this.PixelPosition - new Vector2(10, -2); Explosion.Visible = true; Vector2 LightPosition = new Vector2(CentrePos.X, CentrePos.Y) - Camera.CamPos; Explosion.OrbLight.Position = LightPosition; if (explosionTimer < maxExplosionTime - maxExplosionTime + 0.3f) { Explosion.OrbLight.Intensity = 0.25f; } } } }
public SentryTurret(Game game, Vector2 sentryPosition, List <TileRef> sheetRefs, int frameWidth, int frameHeight, float layerDepth, string nameIn, float angle, SoundEffect turnSound, SoundEffect explosionSound) : base(game, sentryPosition, sheetRefs, frameWidth, frameHeight, layerDepth) { Name = nameIn; DrawOrder = 60; origin = trueOrigin; this.angleOfRotation = angle; healthBar = new HealthBar(game, PixelPosition); Health = 100; AddHealthBar(healthBar); Interlocked.Increment(ref Count); #region Turret Audio ExplosionSound = explosionSound; TankTurnSound = turnSound; TurnSoundInstance = TankTurnSound.CreateInstance(); TurnSoundInstance.Volume = 0f; TurnSoundInstance.Pitch = -0.75f; TurnSoundInstance.IsLooped = true; TurnSoundInstance.Play(); #endregion #region Muzzleflash Sprite muzzleFlash = new MuzzleFlash(Game, PixelPosition, new List <TileRef>() { new TileRef(11, 1, 0), new TileRef(11, 0, 0), }, 64, 64, 0f); #endregion #region Explosion Sprite explosionSprite = new TankExplosion(Game, PixelPosition, new List <TileRef>() { new TileRef(0, 6, 0), new TileRef(1, 6, 0), new TileRef(2, 6, 0), new TileRef(3, 6, 0), new TileRef(4, 6, 0), new TileRef(5, 6, 0), new TileRef(6, 6, 0), new TileRef(7, 6, 0) }, 64, 64, 0f) { Visible = false }; #endregion }
public override void Draw(GameTime gameTime) { TankExplosion Explosion = (TankExplosion)Game.Services.GetService(typeof(TankExplosion)); Explosion.Visible = false; if (Health <= 0) { Explosion.Visible = true; Explosion.PixelPosition = this.CentrePos; } base.Draw(gameTime); }
public TilePlayerTurret(Game game, Vector2 playerPosition, List <TileRef> sheetRefs, int frameWidth, int frameHeight, float layerDepth, SoundEffect shellSound, SoundEffect humReload, SoundEffect shellReload, SoundEffect turnSound, SoundEffect explosionSound) : base(game, playerPosition, sheetRefs, frameWidth, frameHeight, layerDepth) { DrawOrder = 70; origin = rotateOrigin; #region Turret Audio this.ExplosionSound = explosionSound; this.ShellSound = shellSound; this.ShellReload = shellReload; this.HumReload = humReload; TankTurnSound = turnSound; HumReloadInstance = HumReload.CreateInstance(); HumReloadInstance.Volume = 0.1f; HumReloadInstance.Pitch = -0.5f; TurnSoundInstance = TankTurnSound.CreateInstance(); TurnSoundInstance.Volume = 0f; TurnSoundInstance.Pitch = -0.75f; TurnSoundInstance.IsLooped = true; TurnSoundInstance.Play(); #endregion #region Muzzleflash Sprite muzzleFlash = new MuzzleFlash(Game, PixelPosition, new List <TileRef>() { new TileRef(11, 1, 0), new TileRef(11, 0, 0), }, 64, 64, 0f); #endregion #region Explosion Sprite explosionSprite = new TankExplosion(Game, PixelPosition, new List <TileRef>() { new TileRef(0, 6, 0), new TileRef(1, 6, 0), new TileRef(2, 6, 0), new TileRef(3, 6, 0), new TileRef(4, 6, 0), new TileRef(5, 6, 0), new TileRef(6, 6, 0), new TileRef(7, 6, 0) }, 64, 64, 0f) { Visible = false }; #endregion }
protected override void Initialize() { Window.Position = new Point( (GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width / 2) - (graphics.PreferredBackBufferWidth / 2), (GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height / 2) - (graphics.PreferredBackBufferHeight / 2)); new InputEngine(this); // Add Camera CurrentCamera = new Camera(this, Vector2.Zero, new Vector2((tileMap.GetLength(1) * tileWidth), (tileMap.GetLength(0) * tileHeight))); Services.AddService(CurrentCamera); #region Create Player Tank TilePlayer tankPlayer = new TilePlayer(this, new Vector2(96, 192), new List <TileRef>() { new TileRef(10, 0, 0), }, 64, 64, 0f, Content.Load <SoundEffect>("audio/PlayerTankHum"), Content.Load <SoundEffect>("audio/PlayerTankTracks")); TilePlayerTurret tankPlayerTurret = new TilePlayerTurret(this, tankPlayer.PixelPosition, new List <TileRef>() { new TileRef(10, 1, 0), }, 64, 64, 0f, Content.Load <SoundEffect>("audio/PlayerTankShoot"), Content.Load <SoundEffect>("audio/PlayerTankReload"), Content.Load <SoundEffect>("audio/PlayerTurretTurn"), Content.Load <SoundEffect>("audio/TankExplosion")); // Add Tank Projectile const int PLAYER_BULLET_SPD = 25; Projectile bullet = new Projectile(this, "PLAYER", tankPlayerTurret.CentrePos, new List <TileRef>() { new TileRef(10, 2, 0), }, 64, 64, 0f, tankPlayerTurret.Direction, PLAYER_BULLET_SPD, Content.Load <SoundEffect>("audio/TankShoot"), Content.Load <SoundEffect>("audio/TankArmorPierce")); tankPlayerTurret.AddProjectile(bullet); Services.AddService(bullet); Services.AddService(tankPlayer); Services.AddService(tankPlayerTurret); #endregion #region Load Animated Sprites MuzzleFlash muzzleFlash = new MuzzleFlash(this, tankPlayerTurret.PixelPosition, new List <TileRef>() { new TileRef(11, 1, 0), new TileRef(11, 0, 0), }, 64, 64, 0f); MuzzleFlashSentry muzzleFlashSentry = new MuzzleFlashSentry(this, tankPlayerTurret.PixelPosition, new List <TileRef>() { new TileRef(11, 0, 0), new TileRef(11, 1, 0), }, 64, 64, 0f); BulletExplosion bulletExplosionSprite = new BulletExplosion(this, bullet.PixelPosition, new List <TileRef>() { new TileRef(0, 7, 0), new TileRef(1, 7, 0), new TileRef(2, 7, 0), new TileRef(3, 7, 0), new TileRef(4, 7, 0), new TileRef(5, 7, 0), new TileRef(6, 7, 0), new TileRef(7, 7, 0) }, 64, 64, 0f); TankExplosion tankExplosionSprite = new TankExplosion(this, tankPlayer.PixelPosition, new List <TileRef>() { new TileRef(0, 6, 0), new TileRef(1, 6, 0), new TileRef(2, 6, 0), new TileRef(3, 6, 0), new TileRef(4, 6, 0), new TileRef(5, 6, 0), new TileRef(6, 6, 0), new TileRef(7, 6, 0) }, 64, 64, 0f); #endregion #region Add Animated Sprites to Services Services.AddService(muzzleFlash); Services.AddService(muzzleFlashSentry); Services.AddService(tankExplosionSprite); Services.AddService(bulletExplosionSprite); #endregion #region Create Sentry Tanks // Tank Rotations const float ANGLE_VERTICAL = 1.574f; const float ANGLE_HORIZONTAL = 3.15f; const float ANGLE_DIAG_LEFT = 2.4f; // Minus for up left const float ANGLE_DIAG_RIGHT = 0.75f; // Minus for up right // Y = 325 Sentry enemyOne = new Sentry(this, new Vector2(700, 200), new List <TileRef>() { new TileRef(10, 4, 0), }, 64, 64, 0f, "Enemy Tank 1", Content.Load <SoundEffect>("audio/PlayerTankHum"), Content.Load <SoundEffect>("audio/PlayerTankTracks"), -ANGLE_DIAG_LEFT); //Sentry enemyTwo = new Sentry(this, new Vector2(1180, 237), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 2", ANGLE_VERTICAL); //Sentry enemyThree = new Sentry(this, new Vector2(2020, 295), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 3", ANGLE_VERTICAL); //Sentry enemyFour = new Sentry(this, new Vector2(2617, 549), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 4", ANGLE_DIAG_LEFT); //Sentry enemyFive = new Sentry(this, new Vector2(3490, 42), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 5", ANGLE_DIAG_LEFT); //Sentry enemySix = new Sentry(this, new Vector2(3609, 318), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 6", ANGLE_HORIZONTAL); //Sentry enemySeven = new Sentry(this, new Vector2(2882, 49), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 7", ANGLE_VERTICAL); //Sentry enemyEight = new Sentry(this, new Vector2(3390, 860), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 8", -ANGLE_HORIZONTAL); //Sentry enemyNine = new Sentry(this, new Vector2(3455, 1442), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 9", ANGLE_DIAG_LEFT); //Sentry enemyTen = new Sentry(this, new Vector2(2845, 1760), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 10", -ANGLE_HORIZONTAL); //Sentry enemyEleven = new Sentry(this, new Vector2(2316, 1345), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 11", -ANGLE_HORIZONTAL); //Sentry enemyTwelve = new Sentry(this, new Vector2(54, 1916), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 12", -ANGLE_DIAG_RIGHT); //Sentry enemyThirteen = new Sentry(this, new Vector2(175, 1188), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 13", ANGLE_DIAG_RIGHT); //Sentry enemyFourteen = new Sentry(this, new Vector2(45, 766), new List<TileRef>() //{ // new TileRef(10, 4, 0), //}, 64, 64, 0f, "Enemy Tank 14", 0f); #endregion #region Add Sentry's to List Sentries.Add(enemyOne); //Sentries.Add(enemyTwo); //Sentries.Add(enemyThree); //Sentries.Add(enemyFour); //Sentries.Add(enemyFive); //Sentries.Add(enemySix); //Sentries.Add(enemySeven); //Sentries.Add(enemyEight); //Sentries.Add(enemyNine); //Sentries.Add(enemyTen); //Sentries.Add(enemyEleven); //Sentries.Add(enemyTwelve); //Sentries.Add(enemyThirteen); //Sentries.Add(enemyFourteen); Services.AddService(Sentries); #endregion #region Create Sentry Tank Turrets SentryTurret enemyTurretOne = new SentryTurret(this, enemyOne.PixelPosition, new List <TileRef>() { new TileRef(10, 5, 0), }, 64, 64, 0f, "Enemy Tank 1", -ANGLE_VERTICAL, Content.Load <SoundEffect>("audio/SentryTurretTurn"), Content.Load <SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretTwo = new SentryTurret(this, enemyTwo.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 2", ANGLE_VERTICAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretThree = new SentryTurret(this, enemyThree.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 3", ANGLE_VERTICAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretFour = new SentryTurret(this, enemyFour.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 4", -ANGLE_HORIZONTAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretFive = new SentryTurret(this, enemyFive.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 5", -ANGLE_HORIZONTAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretSix = new SentryTurret(this, enemySix.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 6", -ANGLE_HORIZONTAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretSeven = new SentryTurret(this, enemySeven.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 7", ANGLE_VERTICAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretEight = new SentryTurret(this, enemyEight.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 8", -ANGLE_HORIZONTAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretNine = new SentryTurret(this, enemyNine.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 9", ANGLE_VERTICAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretTen = new SentryTurret(this, enemyTen.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 10", -ANGLE_HORIZONTAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretEleven = new SentryTurret(this, enemyEleven.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 11", -ANGLE_HORIZONTAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretTwelve = new SentryTurret(this, enemyTwelve.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 12", -ANGLE_VERTICAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretThirteen = new SentryTurret(this, enemyThirteen.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 13", ANGLE_VERTICAL, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); //SentryTurret enemyTurretFourteen = new SentryTurret(this, enemyFourteen.PixelPosition, new List<TileRef>() //{ // new TileRef(10, 5, 0), //}, 64, 64, 0f, "Enemy Tank 14", 0f, Content.Load<SoundEffect>("audio/SentryTurretTurn"), //Content.Load<SoundEffect>("audio/TankExplosion")); #endregion #region Add Sentry Turrets to List SentryTurrets.Add(enemyTurretOne); //SentryTurrets.Add(enemyTurretTwo); //SentryTurrets.Add(enemyTurretThree); //SentryTurrets.Add(enemyTurretFour); //SentryTurrets.Add(enemyTurretFive); //SentryTurrets.Add(enemyTurretSix); //SentryTurrets.Add(enemyTurretSeven); //SentryTurrets.Add(enemyTurretEight); //SentryTurrets.Add(enemyTurretNine); //SentryTurrets.Add(enemyTurretTen); //SentryTurrets.Add(enemyTurretEleven); //SentryTurrets.Add(enemyTurretTwelve); //SentryTurrets.Add(enemyTurretThirteen); //SentryTurrets.Add(enemyTurretFourteen); Services.AddService(SentryTurrets); #endregion #region Create Sentry Tank Projectiles int ENEMY_BULLET_SPD = tankPlayerTurret.Bullet.Velocity / 4; Projectile enemyBulletOne = new Projectile(this, "SENTRY", new Vector2(0, 0), new List <TileRef>() { new TileRef(10, 2, 0), }, 64, 64, 0f, enemyTurretOne.Direction, ENEMY_BULLET_SPD, Content.Load <SoundEffect>("audio/SentryTankShoot"), Content.Load <SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletTwo = new Projectile(this, "SENTRY", new Vector2(0,0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretTwo.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShootAlt"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletThree = new Projectile(this, "SENTRY", new Vector2(0,0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretThree.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShootAlt"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletFour = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretFour.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShoot"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletFive = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretFive.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShootAlt"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletSix = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretSix.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShoot"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletSeven = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretSeven.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShoot"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletEight = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretEight.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShootAlt"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletNine = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretNine.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShootAlt"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletTen = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretTen.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShoot"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletEleven = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretEleven.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShootAlt"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletTwelve = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretTwelve.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShootAlt"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletThirteen = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretThirteen.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShoot"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); //Projectile enemyBulletFourteen = new Projectile(this, "SENTRY", new Vector2(0, 0), new List<TileRef>() //{ // new TileRef(10, 2, 0), //}, 64, 64, 0f, enemyTurretFourteen.Direction, ENEMY_BULLET_SPD, //Content.Load<SoundEffect>("audio/SentryTankShootAlt"), //Content.Load<SoundEffect>("audio/TankArmorPierce")); List <Projectile> sentryProjectiles = new List <Projectile>() { enemyBulletOne//, enemyBulletTwo, enemyBulletThree, //enemyBulletFour, enemyBulletFive, enemyBulletSix, //enemyBulletFive, enemyBulletSeven, enemyBulletEight, //enemyBulletNine, enemyBulletTen, enemyBulletEleven, //enemyBulletTwelve, enemyBulletThirteen, enemyBulletFourteen }; for (int i = 0; i < SentryTurrets.Count; i++) { sentryProjectiles[i].explosionLifeSpan = bullet.explosionLifeSpan * 2; SentryTurrets[i].AddProjectile(sentryProjectiles[i]); } #endregion #region Add PowerUps //PowerUp Speed = new PowerUp(this, new Vector2(200, 192), new List<TileRef>() //{ // new TileRef(4,3,0), //}, 64, 64, 0f, 5, PowerUp.PowerUpType.SpeedBoost, 0, 2, //Content.Load<SoundEffect>(@"audio/Resupply")); //PowerUp Heal = new PowerUp(this, new Vector2(500, 192), new List<TileRef>() //{ // new TileRef(4,3,0), //}, 64, 64, 0f, 1, PowerUp.PowerUpType.Heal, 50, 1, //Content.Load<SoundEffect>(@"audio/Resupply")); //PowerUp DefenseBoost = new PowerUp(this, new Vector2(500, 192), new List<TileRef>() //{ // new TileRef(4,3,0), //}, 64, 64, 0f, 60, PowerUp.PowerUpType.DefenseBoost, 0, 2, //Content.Load<SoundEffect>(@"audio/Resupply")); //PowerUp ExtraDamage = new PowerUp(this, new Vector2(500, 192), new List<TileRef>() //{ // new TileRef(4,3,0), //}, 64, 64, 0f, 60, PowerUp.PowerUpType.ExtraDamage, 0, 2, //Content.Load<SoundEffect>(@"audio/Resupply")); //PowerUp Camouflage = new PowerUp(this, new Vector2(500, 192), new List<TileRef>() //{ // new TileRef(4,3,0), //}, 64, 64, 0f, 5, PowerUp.PowerUpType.Camouflage, 0, 0, //Content.Load<SoundEffect>(@"audio/Resupply")); #endregion #region Add Crosshair new Crosshair(this, new Vector2(0, 0), new List <TileRef>() { new TileRef(10, 3, 0), }, 64, 64, 0f); #endregion #region Set Collisions SetCollider(TileType.DIRT); SetCollider(TileType.METAL); SetTrigger(TileType.DIRT2); // For WIN condition #endregion base.Initialize(); }