Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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);
        }