private void OnTriggerEnter(Collider other) { Tank otherTank = other.GetComponent <Tank>(); if (otherTank != null) { if (!SpawnExplosion) { if (!manager.OnlineGame || PhotonNetwork.IsMasterClient) { otherTank.Health -= Damage; if (PhotonNetwork.IsMasterClient) { Hashtable hash = otherTank.MyPlayer.CustomProperties; hash["Health"] = otherTank.Health; otherTank.MyPlayer.SetCustomProperties(hash); } } BulletExplosion explosion = Instantiate(ExplosionPrefab).GetComponent <BulletExplosion>(); explosion.transform.position = transform.position; explosion.transform.localScale = new Vector3(ExplosionRadius, ExplosionRadius, ExplosionRadius); explosion.Damage = 0; AudioSource audio = explosion.GetComponent <AudioSource>(); audio.clip = ExplosionSound; audio.Play(); } Explode(); } }
private void Explode() { cameraEffects.Shake(0.25f); MyParticles.Stop(); MyParticles.gameObject.AddComponent <ParticleKiller>(); MyParticles.transform.parent = null; if (SpawnExplosion) { BulletExplosion explosion = Instantiate(ExplosionPrefab).GetComponent <BulletExplosion>(); explosion.transform.position = transform.position; explosion.transform.localScale = new Vector3(ExplosionRadius, ExplosionRadius, ExplosionRadius); explosion.Damage = Damage; AudioSource audio = explosion.GetComponent <AudioSource>(); audio.clip = ExplosionSound; audio.Play(); } Destroy(gameObject); if (!IgnoreLanding) { manager.BulletLanded(); } // todo - cause different effects here depending on the bullet }
private void OnDead() { if (IsDead) { return; } IsDead = true; //音效 Sound.PlayUiAudioOneShot(Deploy.deadSound); //特效 EffectFactory.PlayEffectOnce(Deploy.deadEffect, transform.position); //播放shader特效 StageCamera2D.Instance.PlayDeadEffect(transform.position); //销毁僚机 SupportMgr.Clear(); //销毁自己 Destroy(gameObject); //发事件 GameEventCenter.Send(GameEvent.OnPlayerDead); //销毁子弹 BulletExplosion.Create(transform.position, 0.3f); }
public Projectile(Game game, string ParentName, Vector2 projectilePosition, List <TileRef> sheetRefs, int frameWidth, int frameHeight, float layerDepth, Vector2 direction, int speed, SoundEffect sndShoot, SoundEffect sndPierce) : base(game, projectilePosition, sheetRefs, frameWidth, frameHeight, layerDepth) { Parent = ParentName; Target = Vector2.Zero; Direction = direction; DrawOrder = 50; StartPosition = projectilePosition; _sndShoot = sndShoot; _sndPierce = sndPierce; Velocity = speed; PenumbraComponent penumbra = Game.Services.GetService <PenumbraComponent>(); penumbra.Lights.Add(OrbLight); OrbLight.Enabled = false; explosionSprite = new BulletExplosion(Game, this.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); }
public void AddBulletExplosion(Vector2 globalPosition, float rotation) { BulletExplosion explosion = InstanceResource <BulletExplosion>("res://objects/BulletExplosion.tscn"); explosion.GlobalPosition = globalPosition; gameplayScreen.AddProjectile(explosion); explosion.Start(rotation); }
private void ChangeToNextCard() { //销毁当前Card var isFirstCard = true; if (_currCard != null) { //销毁子弹 BulletExplosion.Create(Master.transform.position, 0.02f); //播放音效(success or failed) //todo Sound.PlayUiAudioOneShot(106); _currCard.OnDisable(); _currCard.OnDestroy(); _currCard = null; isFirstCard = false; } //有剩余符卡,切换到下一个 if (_cardList.Count > 0) { _currCard = _cardList[0]; _cardList.RemoveAt(0); _currCard.OnEnable(isFirstCard); _cardStartTime = Time.time; //播放收缩or扩大特效 if (!isFirstCard) { if (_currCard.Phase == EBossCardPhase.Two) { Master.PlayShirnkEffect(); } else { Master.PlayShirnkEffect(true); } } } else { //所有符卡用完了,直接死亡 Master.SelfDie(); } }
public static void ClearCache() { DialogMgr.InDrawingDialog = false; BulletExplosion.Reset(); UiMenuBase.ClearSelectStatus(); //清理UI UiManager.Clear(); //清理音效 Sound.StopEnvironmentMusic(); Sound.StopMusic(); Sound.ClearSoundCache(); //清理UI图集 SpriteAtlasMgr.ClearCache(); }
private void Start() { BulletSlowMove bulletSlowMove = gameObject.AddComponent <BulletSlowMove>(); bulletSlowMove.AddBulletPar(bulletDamage, bulletSpeed, bulletForce); BulletExplosion bulletExplosion = gameObject.AddComponent <BulletExplosion>(); bulletExplosion.AddBulletPar(bulletDamage, bulletSpeed, bulletForce); BulletSniper bulletSniper = gameObject.AddComponent <BulletSniper>(); bulletSniper.AddBulletPar(bulletDamage, bulletSpeed, bulletForce); bulletEffects = new BulletEffects[] { bulletSniper, bulletSlowMove, bulletExplosion }; }
public override void Draw(GameTime gameTime) { BulletExplosion Explosion = (BulletExplosion)Game.Services.GetService(typeof(BulletExplosion)); if (ProjectileState == PROJECTILE_STATUS.Exploding && Explosion.State == BulletExplosion.Effect.Idle) { Explosion.PixelPosition = this.PixelPosition; Explosion.Visible = true; if (Explosion.CurrentFrame >= Explosion.FrameCount - 1) { Explosion.Visible = false; Explosion.State = BulletExplosion.Effect.Exploding; } } else if (ProjectileState == PROJECTILE_STATUS.Firing) { Explosion.State = BulletExplosion.Effect.Idle; } base.Draw(gameTime); }
public void SetExplosion(BulletExplosion be) { TurretScript ts = be.turret; this.damage = be.eDamage; this.aoe = ts.explosionAOE; this.radius = be.eRadius; this.effect = be.eEffect; this.effectTime = be.eEffectTime; this.turret = ts; this.target = be.target; if (target != null) { transform.position = target.transform.position; } else { transform.position = be.transform.position; } }
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(); }