private void GenerateMinions() { Minions = Enumerable.Repeat(0, MPL).Select(_ => Minion.GenerateMinion(Level)).ToList(); foreach (var minion in Minions) { minion.OnDeath += Minion_OnDeath; minion.TookDamage += Minion_TookDamage; } _currentMonster = Minions.First(); }
private void Minion_OnDeath(IMonster minion, ulong reward) { OnMonsterDeath?.Invoke(minion, reward); Minions.Remove((Minion)minion); if (Minions.Count == 0) { _currentMonster = Boss; } else { _currentMonster = Minions.First(); } OnNewMonster?.Invoke(_currentMonster); }