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

30 lines
790 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
[Serializable]
public class MissionDialogueData : DialogueData<MissionDialogue>
{
/// <summary>
/// build Data model based on Object
/// </summary>
/// <param name="dialogue"></param>
public MissionDialogueData(Dialogue dialogue)
{
CurrentStep = dialogue.CurrentStep;
DialogueStepModelDataList.Clear();
foreach (DialogueStepModel dialogueStepModelData in dialogue.DialogueSteps)
{
/*
* pass WasDisplayed value from model to data representative class
*/
DialogueStepModelDataList.Add(new DialogueStepData(dialogueStepModelData.WasDisplayed));
}
}
}