public override void Initialize() { elapsed = 0; shootOrder = 0; rank = 0; shooter = new Enemy(LuxGame, World, 0, 0, 0, null); shooter.Skin = new Sprite(shooter, new List<Texture2D>() { enemyTexture }, null); shooter.Skin.SetAnimation(enemyTexture.Name); Game.Components.Add(shooter); warning = new Enemy(LuxGame, World, 0, 0, 0, null); warning.Skin = new Sprite(warning, new List<Texture2D>() { warningTexture }, null); warning.Skin.SetAnimation(warningTexture.Name); warning.Position = new Vector2(-40, -40); Game.Components.Add(warning); bigShooter = new Enemy(LuxGame, World, 0, 0, 0, null); bigShooter.Skin = new Sprite(bigShooter, new List<Texture2D>() { enemyTexture }, null); bigShooter.Skin.SetAnimation(enemyTexture.Name); for (int i = 0; i < 20; i++) { HomingMissile homingShoot = new HomingMissile(this.LuxGame, 0, false, (float)0.05, 20, 1, World, null); homingShoot.Skin = new Sprite(homingShoot, new List<Texture2D>() { bigBulletText }, null); homingShoot.Skin.SetAnimation(bigBulletText.Name); Game.Components.Add(homingShoot); Game.Components.Add(homingShoot.Skin); homingShots.Add(homingShoot); } Game.Components.Add(bigShooter); rotationAngle = Common.Rand.Next(0, 300); currentDirectionVector = new Vector2(0, (float)1.5); currentAccelVector = new Vector2(1, 0); base.Initialize(); }
public override void Initialize() { elapsed = 0; shootOrder = 0; secondShootOrder = 0; rank = 0; ShotPool redShots = new ShotPool(LuxGame, World, false, 0.3, 100, 100, shotHitBox, 15, bulletText, null); Game.Components.Add(redShots); ShotsOfType.Add(redShots); ShotPool blueShots = new ShotPool(LuxGame, World); shooter = new Enemy(LuxGame, World, 0, 0, 0, new List<ShotPool>() {blueShots}, null); shooter.Skin = new Sprite(shooter, new List<Texture2D>() { enemyTexture }, null); shooter.Skin.SetAnimation(enemyTexture.Name); Game.Components.Add(blueShots); Game.Components.Add(shooter); ShotPool bigShots = new ShotPool(LuxGame, World, false, 1.5, 150, 200, 20, 50, bigBulletText, null); bigShooter = new Enemy(LuxGame, World, 0, 0, 0, new List<ShotPool>() {bigShots}, null); bigShooter.Skin = new Sprite(bigShooter, new List<Texture2D>() { enemyTexture }, null); bigShooter.Skin.SetAnimation(enemyTexture.Name); Game.Components.Add(bigShots); for (int i = 0; i < 20; i++) { HomingMissile homingShoot = new HomingMissile(this.LuxGame, 0, false, (float)0.05, 20, 7, World, null); homingShoot.Skin = new Sprite(homingShoot, new List<Texture2D>() { bigBulletText }, null); homingShoot.Skin.SetAnimation(bigBulletText.Name); Game.Components.Add(homingShoot); Game.Components.Add(homingShoot.Skin); homingShots.Add(homingShoot); World.BadShots.Add(homingShoot); } for (int i = 0; i < 15; i++) { RotatingShot rotatingShot = new RotatingShot(this.LuxGame, World, 0, false, (float)0.02, 10, null); rotatingShot.Skin = new Sprite(rotatingShot, new List<Texture2D>() { bigBulletText }, null); rotatingShot.Skin.SetAnimation(bigBulletText.Name); Game.Components.Add(rotatingShot); Game.Components.Add(rotatingShot.Skin); rotatingShots.Add(rotatingShot); World.BadShots.Add(rotatingShot); } Game.Components.Add(bigShooter); rotationAngle = (float)0.02; currentDirectionVector = new Vector2(0, (float)2.5); remainingTimeDeterminer = 0; remainingTime = 0.3 * Math.Cos(remainingTimeDeterminer); base.Initialize(); }