Exemple #1
0
        private void EndApplyBattle()
        {
            Fleet1.ForEach(Delegates.OnEndUpdate);
            Fleet2?.ForEach(Delegates.OnEndUpdate);
            EnemyFleet.ForEach(Delegates.OnEndUpdate);
            //mvp
            Fleet1.TakeMaxOrDefault(x => x.DamageGiven).SetMvp();
            Fleet2?.TakeMaxOrDefault(x => x.DamageGiven).SetMvp();
            EnemyFleet.TakeMaxOrDefault(x => x.DamageGiven).SetMvp();

            OnAllPropertyChanged();
        }
Exemple #2
0
        private void EndApplyBattle()
        {
            void OnEndUpdate(ShipInBattle ship)
            {
                ship.EndUpdate();
                ship.IsMostDamage = false;
            }

            Fleet1.ForEach(OnEndUpdate);
            Fleet2?.ForEach(OnEndUpdate);
            EnemyFleet.ForEach(OnEndUpdate);
            EnemyFleet2?.ForEach(OnEndUpdate);
            //mvp
            Fleet1.TakeMaxOrDefault(x => x.DamageGiven).SetMvp();
            Fleet2?.TakeMaxOrDefault(x => x.DamageGiven).SetMvp();
            EnemyFleet.TakeMaxOrDefault(x => x.DamageGiven).SetMvp();
            EnemyFleet2?.TakeMaxOrDefault(x => x.DamageGiven).SetMvp();

            OnAllPropertyChanged();
        }