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

64 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
[Serializable]
public class MissionData : IModelMapper<Mission>
{
[SerializeField]
public string MissionName;
[SerializeField]
public string SpeakerName;
[SerializeField]
public MissionStatusEnum Status = MissionStatusEnum.None;
[SerializeField]
public int CurrentStep = 0;
[SerializeField]
public List<MissionStepData> MissionStepsDataList = new List<MissionStepData>();
/// <summary>
/// build Data model based on Object
/// </summary>
/// <param name="dialogue"></param>
public MissionData(Mission mission)
{
MissionName = mission.MissionName;
SpeakerName = mission.SpeakerName;
Status = mission.Status;
CurrentStep = mission.CurrentStep;
MissionStepsDataList.Clear();
foreach (MissionStepModel missionStepModelData in mission.MissionStepsList)
{
/*
* pass WasDisplayed value from model to data representative class
*/
MissionStepsDataList.Add(new MissionStepData(missionStepModelData));
}
}
#region NotImplemented
/*
* we dont want to map it here, we will mark fields in NpcDialogfeManager after each loading and fetching dialogue
*/
public Mission MapDataToObject(string prefarbAssetName)
{
throw new NotImplementedException();
}
public Mission MapDataToObject()
{
throw new NotImplementedException();
}
#endregion
}