Scriptum/Assets/Scripts/REFACTORING/Models/Mission/MissionData.cs

64 lines
1.6 KiB
C#
Raw Permalink Normal View History

2023-01-01 17:03:35 +01:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
[Serializable]
2023-01-03 22:44:24 +01:00
public class MissionData : IModelMapper<Mission>
2023-01-01 17:03:35 +01:00
{
2023-01-03 22:44:24 +01:00
[SerializeField]
public string MissionName;
[SerializeField]
public string SpeakerName;
2023-01-01 17:03:35 +01:00
[SerializeField]
public MissionStatusEnum Status = MissionStatusEnum.None;
[SerializeField]
public int CurrentStep = 0;
[SerializeField]
public List<MissionStepData> MissionStepsDataList = new List<MissionStepData>();
2023-01-03 22:44:24 +01:00
/// <summary>
/// build Data model based on Object
/// </summary>
/// <param name="dialogue"></param>
public MissionData(Mission mission)
2023-01-01 17:03:35 +01:00
{
2023-01-03 22:44:24 +01:00
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));
}
2023-01-01 17:03:35 +01:00
}
2023-01-03 22:44:24 +01:00
#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)
2023-01-01 17:03:35 +01:00
{
throw new NotImplementedException();
}
2023-01-03 22:44:24 +01:00
public Mission MapDataToObject()
2023-01-01 17:03:35 +01:00
{
throw new NotImplementedException();
}
2023-01-03 22:44:24 +01:00
#endregion
2023-01-01 17:03:35 +01:00
}