Firstborn/Assets/RPG Creation Kit/Scripts/Dialogue System/Graphs/DialogueGraph.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

32 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XNode;
using RPGCreationKit.DialogueSystem;
namespace RPGCreationKit.DialogueSystem
{
[CreateAssetMenu(fileName = "New DialogueGraph", menuName = "RPG Creation Kit/Dialogues/New DialogueGraph", order = 1)]
public class DialogueGraph : NodeGraph
{
public string ID;
public EntryNode GetEntryNode()
{
for (int i = 0; i < nodes.Count; i++)
if (nodes[i] is EntryNode) return nodes[i] as EntryNode;
//Debug.LogWarning("Tried to get Entry Node of Dialogue " + this.name + " but no Entry Node has been found. Assure that one and only one EntryNode exist.");
return null;
}
public EndNode GetEndNode()
{
for (int i = 0; i < nodes.Count; i++)
if (nodes[i] is EndNode) return nodes[i] as EndNode;
//Debug.LogWarning("Tried to get Entry Node of Dialogue " + this.name + " but no Entry Node has been found. Assure that one and only one EntryNode exist.");
return null;
}
}
}