示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SeismicCharge"/> class.
        /// </summary>
        /// <param name="sprite">sprite of the enemy.</param>
        /// <param name="movement">movement pattern.</param>
        public SeismicCharge(SpriteN sprite, Movement movement)
            : base(sprite, movement)
        {
            float r = (float)(this.Sprite.Texture.Width > this.Sprite.Texture.Height ? Sprite.Texture.Height : Sprite.Texture.Width);
            var   p = Position;

            this.hitCircle = new HitCircle(p, r / 2);
        }
示例#2
0
 public EnemyFactory(List <LifetimeEntity> enemyList, List <LifetimeEntity> bulletSpawnerList, BulletSpawner spawner, SpriteN sprite, Movement movement, int health = 100, float delay = 0)
 {
     bulletSpawner  = spawner;
     this.enemyList = enemyList;
     spawnerList    = bulletSpawnerList;
     this.sprite    = sprite;
     mMovement      = movement;
     this.health    = health;
 }
示例#3
0
 public SpawnPattern(List <Bullet> bullets, SpriteN bulletSprite, float speed, int totalBullets, double spawnRate)
 {
     this.bulletList   = bullets;
     this.bulletSprite = bulletSprite;
     this.totalBullets = totalBullets;
     this.spawnRate    = spawnRate;
     this.numSpawned   = 0;
     this.IsEnabled    = false;
     this.timeElapsed  = 0;
     this.speed        = speed;
     this.sound        = SoundManager.Instance;
     this.volume       = VolumeManager.Instance;
 }
示例#4
0
 public LinearPattern(List <Bullet> bullets, SpriteN bulletSprite, float speed, int totalBullets, double spawnRate)
     : base(bullets, bulletSprite, speed, totalBullets, spawnRate)
 {
     mPlayer = Player.Instance();
 }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Item"/> class.
 /// </summary>
 /// <param name="sprite">sprite of the enemy.</param>
 /// <param name="movement">movement pattern.</param>
 public Item(SpriteN sprite, Movement movement)
     : base(sprite, movement)
 {
 }
示例#6
0
 public SpiralPattern(List <Bullet> bullets, SpriteN bulletSprite, float speed, int totalBullets, double spawnRate, int rotations = 1, float finalDist = 300) : base(bullets, bulletSprite, speed, totalBullets, spawnRate)
 {
     finalDistance  = finalDist;
     this.rotations = rotations;
 }
示例#7
0
 public SurroundPattern(List <Bullet> bulletList, SpriteN bulletSprite, float speed, int spawnCount, float spawnRate, int fireCount = 10)
     : base(bulletList, bulletSprite, speed, spawnCount, spawnRate)
 {
     rPlayer        = Player.Instance();
     this.fireCount = fireCount;
 }
 public SeismicChargesDisplay(SeismicChargeCount seismicChargeCount)
 {
     this.chargeSprite       = ItemsSpriteFactory.Create("seismic");
     this.seismicChargeCount = seismicChargeCount;
 }
示例#9
0
 public PlayerShoot(SpriteN bulletSprite)
 {
     this.bulletSprite = bulletSprite;
     manager           = BulletManager.Instance;
 }