first commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using OTGIntegrated.Quests;
|
||||
using UnityEngine;
|
||||
|
||||
namespace OTGIntegrated.Dialogue
|
||||
{
|
||||
[CreateAssetMenu(fileName = "DialogueNode", menuName = "OTG Integrated/Dialogue Node")]
|
||||
public sealed class DialogueNode : ScriptableObject
|
||||
{
|
||||
public string nodeId;
|
||||
public string speakerName;
|
||||
[TextArea(3, 8)] public string npcLine;
|
||||
public DialogueResponse[] responses;
|
||||
public bool isEndNode;
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(nodeId))
|
||||
{
|
||||
nodeId = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class DialogueResponse
|
||||
{
|
||||
public string responseText;
|
||||
public DialogueNode nextNode;
|
||||
public bool endsDialogue;
|
||||
public QuestData questToStart;
|
||||
public QuestData questToComplete;
|
||||
public bool openCrafting;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user