63 lines
1.6 KiB
C#
63 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 abstract class MultiDialogueData<T> : ModelData<T, T>
|
|||
|
{
|
|||
|
protected override string SPRITE_LOCALIZATION => "";
|
|||
|
protected override string MODEL_LOCALIZATION => "Dialogue/";
|
|||
|
|
|||
|
[SerializeField]
|
|||
|
public string SpeakerName;
|
|||
|
|
|||
|
[SerializeField]
|
|||
|
public int CurrentDialogue;
|
|||
|
|
|||
|
[SerializeField]
|
|||
|
public List<IndexValuePair<int, DialogueData>> DialogueStepModelDataList = new List<IndexValuePair<int, DialogueData>>();
|
|||
|
}
|
|||
|
|
|||
|
public class MultiDialogueData : MultiDialogueData<MultiDialogue>
|
|||
|
{
|
|||
|
public MultiDialogueData(MultiDialogue dialogue)
|
|||
|
{
|
|||
|
SpeakerName = dialogue.SpeakerName;
|
|||
|
|
|||
|
CurrentDialogue = dialogue.CurrentDialogue;
|
|||
|
|
|||
|
DialogueStepModelDataList.Clear();
|
|||
|
|
|||
|
foreach(IndexValuePair<int, Dialogue> DialogueStepModelData in dialogue.Dialogues)
|
|||
|
{
|
|||
|
DialogueStepModelDataList.Add(
|
|||
|
new IndexValuePair<int, DialogueData>(
|
|||
|
DialogueStepModelData.Key,
|
|||
|
new DialogueData(DialogueStepModelData.Value)
|
|||
|
)
|
|||
|
);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#region NotImplemented
|
|||
|
public override MultiDialogue MapDataToObject(string prefarbAssetName)
|
|||
|
{
|
|||
|
throw new NotImplementedException();
|
|||
|
}
|
|||
|
|
|||
|
public override MultiDialogue MapDataToObject()
|
|||
|
{
|
|||
|
throw new NotImplementedException();
|
|||
|
}
|
|||
|
|
|||
|
protected override MultiDialogue TryFindResource(string modelName)
|
|||
|
{
|
|||
|
throw new NotImplementedException();
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|
|||
|
|