Scriptum/Assets/Scripts/REFACTORING/Models/Mission/Dialogue/MissionDialogueData.cs

30 lines
790 B
C#
Raw 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;
2023-01-03 22:44:24 +01:00
[Serializable]
public class MissionDialogueData : DialogueData<MissionDialogue>
2023-01-01 17:03:35 +01:00
{
2023-01-02 00:05:47 +01:00
/// <summary>
/// build Data model based on Object
/// </summary>
/// <param name="dialogue"></param>
public MissionDialogueData(Dialogue dialogue)
2023-01-01 17:03:35 +01:00
{
2023-01-02 00:05:47 +01:00
CurrentStep = dialogue.CurrentStep;
2023-01-01 17:03:35 +01:00
2023-01-02 00:05:47 +01:00
DialogueStepModelDataList.Clear();
2023-01-01 17:03:35 +01:00
2023-01-02 00:05:47 +01:00
foreach (DialogueStepModel dialogueStepModelData in dialogue.DialogueSteps)
{
/*
* pass WasDisplayed value from model to data representative class
*/
DialogueStepModelDataList.Add(new DialogueStepData(dialogueStepModelData.WasDisplayed));
}
2023-01-01 17:03:35 +01:00
}
}