DataEditor & StorySystem Graph
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SLSFramework.StorySystem.Dialog
|
||||
{
|
||||
[CreateAssetMenu(fileName = "NewCharacterData", menuName = "StorySystem/Dialog/Character Data")]
|
||||
public partial class CharacterData : ScriptableObject
|
||||
{
|
||||
public string characterName;
|
||||
|
||||
public List<Expression> expressions = new List<Expression>();
|
||||
}
|
||||
|
||||
public partial class CharacterData
|
||||
{
|
||||
[Serializable]
|
||||
public class Expression
|
||||
{
|
||||
public string key;
|
||||
public Sprite sprite;
|
||||
|
||||
// (将来你还可以在这里添加 audioClip, 动画, etc.)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a58101ba7d997824d889bd04baf1c18c
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SLSFramework.StorySystem.Dialog
|
||||
{
|
||||
[CreateAssetMenu(fileName = "NewDialogueGraph", menuName = "StorySystem/Dialog/Dialog Graph")]
|
||||
public class DialogGraph : GraphBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a36a4bb7be9da947beb608206dc240f
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SLSFramework.StorySystem.Dialog
|
||||
{
|
||||
// ----------------------------------------------------------------------
|
||||
// 各种具体节点的数据
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
[Serializable]
|
||||
public class DialogNodeData : BaseNodeData
|
||||
{
|
||||
public CharacterData characterData;
|
||||
public string expressionKey; // 用于存储所选表情的 name
|
||||
public Vector2 characterPosition;
|
||||
[TextArea(3, 10)] public string dialogueText;
|
||||
public AudioClip audioClip;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class CompoundDialogNodeData : BaseNodeData
|
||||
{
|
||||
public TextAsset compoundDialogAsset;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ChoiceData
|
||||
{
|
||||
public string guid;
|
||||
public string choiceText;
|
||||
public bool isDefault;
|
||||
public string conditionString;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ChoiceNodeData : BaseNodeData
|
||||
{
|
||||
public List<ChoiceData> choices = new List<ChoiceData>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77b3f3b496104dc4d887f70412d2f57f
|
||||
Reference in New Issue
Block a user