34 lines
820 B
C#
34 lines
820 B
C#
|
|
using System;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
[CreateAssetMenu(fileName = "DialogueNode", menuName = "Dialogue/DialogueNode")]
|
||
|
|
public class DialogueNode : ScriptableObject
|
||
|
|
{
|
||
|
|
public string nodeId;
|
||
|
|
public string speakerName;
|
||
|
|
|
||
|
|
[TextArea(3, 8)]
|
||
|
|
public string npcLine;
|
||
|
|
|
||
|
|
public DialogueResponse[] responses;
|
||
|
|
public bool isEndNode;
|
||
|
|
public string editorNote;
|
||
|
|
}
|
||
|
|
|
||
|
|
[Serializable]
|
||
|
|
public class DialogueResponse
|
||
|
|
{
|
||
|
|
public string responseText;
|
||
|
|
public DialogueNode nextNode;
|
||
|
|
public bool endsDialogue;
|
||
|
|
public ItemData requiredItem;
|
||
|
|
public int requiredItemAmount = 1;
|
||
|
|
public string unavailableText;
|
||
|
|
public bool hideIfRequirementsNotMet;
|
||
|
|
public bool consumeRequiredItem;
|
||
|
|
public ItemData rewardItem;
|
||
|
|
public int rewardAmount;
|
||
|
|
public string eventId;
|
||
|
|
public string editorNote;
|
||
|
|
}
|