예제 #1
0
 /// <summary>
 /// Adds an Enemy to the Scene and to the Manager management list
 /// </summary>
 /// <param name="x">The Spawn X Coordinate (Middle)</param>
 /// <param name="y">The Spawn Y Coordinate (Middle)</param>
 /// <param name="type">The Type (Normal Enemy, boss)</param>
 /// <param name="level">The level of the enemy (for calculating the health)</param>
 public void AddEnemy(int x, int y, int type, int level)
 {
     //Console.WriteLine("[Enemy Manager]: Adding Enemy. Level: [" + level + "] x: [" + x + "] y: [" + y + "] Type: [" + type + "]");
     Entities.Enemy Enemy = new Entities.Enemy(x, y, x - Dimensions.ENEMY_MARGIN / 2, x + Dimensions.ENEMY_MARGIN / 2, level);
     this.Enemies.Add(Enemy);
     Game.Instance.Scene.Add(Enemy);
 }
예제 #2
0
 public void Remove(Entities.Enemy en)
 {
     this.Enemies.Remove(en);
 }