public override bool Shoot() { Bullet b = BulletManager.GetBullet(BulletManager.BulletType.RED); if (b != null) { if (bullet == ShootType.STANDARD) { b.Shoot(Position + cannonOffset, new Vector2(240, 0)); } if (bullet == ShootType.DIAGONAL) { b.Shoot(Position + cannonOffset, new Vector2(200, directionY)); directionY = -directionY; } if (bullet == ShootType.TRISHOOT) { counter++; if (counter % 2 != 0) { Bullet b2 = BulletManager.GetBullet(BulletManager.BulletType.RED); Bullet b3 = BulletManager.GetBullet(BulletManager.BulletType.RED); if (b2 != null && b3 != null) { b2.Shoot(Position + cannonOffset, new Vector2(200, directionY)); b3.Shoot(Position + cannonOffset, new Vector2(200, -directionY)); } } b.Shoot(Position + cannonOffset, new Vector2(240, 0)); } return(true); } return(false); }
public static void FireShoot() { Bullet b; b = BulletManager.GetBullet(BulletManager.BulletType.FIRE); if (b != null) { b.Shoot(new Vector2(Game.Window.Width - POS_X, RandomGenerator.GetRandom(b.Height, Game.Window.Height - b.Height)), new Vector2(-500, 0)); } }
public override bool Shoot() { Bullet b; b = BulletManager.GetBullet(BulletManager.BulletType.BLUE); if (b != null) { b.Shoot(Position + cannonOffset, new Vector2(Velocity.X - 350, 0)); return(true); } return(false); }
public override bool Shoot() { Bullet b; b = BulletManager.GetBullet(BulletManager.BulletType.BLUE); if (b != null) { if (bullet == ShootType.DIAGONAL) { b.Shoot(Position - cannonOffset, new Vector2(-200, -200)); } if (bullet == ShootType.VERTICAL) { b.Shoot(Position - cannonOffset, new Vector2(0, -350)); } ChangeBullets(); return(true); } return(false); }
public override bool Shoot() { int shootType = RandomGenerator.GetRandom(0, 10); if (shootType % 2 == 0) { return(base.Shoot()); } else { Bullet b; b = BulletManager.GetBullet(BulletManager.BulletType.FIRE); if (b != null) { b.Shoot(Position - cannonOffset, new Vector2(Velocity.X - 300, 0)); return(true); } return(false); } }