Example #1
0
 protected Enemy(EnemyData data, Rectangle levelBounds)
     : base(data)
 {
     if (data.Weapon != null)
     {
         if (data.Ranged)
         {
             CurrentWeapon = new ProjectileWeapon(data.Weapon, this);
         }
         else
         {
             CurrentWeapon = new MeleeWeapon(data.Weapon, this);
         }
     }
     Difficulty = data.Difficulty;
     _idealRange = data.IdealRange;
 }
Example #2
0
 protected Enemy(EnemyData data, Rectangle levelBounds)
     : base(data.PhysicalData)
 {
     if (data.MeleeWeaponName != null)
         _meleeWeapon = new MeleeWeapon(data.MeleeWeaponName, this);
 }