BattleInfoPlugin.ViewModels.LandBaseAirCombatResultViewModel.LandBaseAirCombatResultViewModel C# (CSharp) Method

LandBaseAirCombatResultViewModel() public method

public LandBaseAirCombatResultViewModel ( LandBaseAirCombatResult result, FleetType type ) : System
result BattleInfoPlugin.Models.LandBaseAirCombatResult
type FleetType
return System
        public LandBaseAirCombatResultViewModel(LandBaseAirCombatResult result, FleetType type)
        {
            this.Name = result.Name;
            this.Stage1 = new AirCombatResultViewModel(result.Stage1, type);
            this.Stage2 = new AirCombatResultViewModel(result.Stage2, type);
            this.Count = this.Stage1.Count;
            this.LostCount = this.Stage1.LostCount + this.Stage2.LostCount;
            this.RemainingCount = this.Count - this.LostCount;

            this.IsHappen = this.Count > 0;

            this.Squadrons = (type == FleetType.Friend) ? result.Squadrons : new Squadron[0];
        }
LandBaseAirCombatResultViewModel