Scriptum/Assets/Scripts/REFACTORING/Models/Mission/Condition/CollectMissionConditionData.cs
2023-01-03 22:44:24 +01:00

41 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
[Serializable]
public class CollectMissionConditionData : MissionConditionData
{
public CollectMissionConditionData(MissionCondition missionCondition) : base(missionCondition.Type)
{
RequiredElements.Clear();
foreach (RequiredSubject requiredSubject in missionCondition.RequiredElements)
{
RequiredElements.Add(new CollectRequiredSubjectData((CollectRequiredSubject)requiredSubject));
}
}
public override MissionCondition MapDataToObject(string prefarbAssetName)
{
throw new NotImplementedException();
}
public override MissionCondition MapDataToObject()
{
var mappedCondition = new MissionCondition(Type);
foreach(var requiredElement in RequiredElements)
{
mappedCondition.RequiredElements.Add(requiredElement.MapDataToObject());
}
return mappedCondition;
}
}