static void Main(string[] args) { List <Enemy> enemies = new List <Enemy>(); Personnage hero = new Personnage("toto", 45, 4); for (int i = 0; i < 10; i++) { if (i < 3) { Enemy e = new Enemy(EnemyType.Barbare, "le mal " + i, 20); hero.methodeCible += e.ActionDuPersonnage; enemies.Add(e); } if (i > 3) { Enemy e = new Enemy(EnemyType.Goblin, "le mal " + i, 20); hero.methodeCible += e.ActionDuPersonnage; enemies.Add(e); } } hero.TirerPartout(EnemyType.Barbare); Console.WriteLine("/**********/"); hero.TirerPartout(EnemyType.Goblin); }
public PersonnageEventArg(Personnage source, EnemyType enemyType) { this.source = source; this.enemyType = enemyType; }