DataEditor & StorySystem Graph
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df71a91d0bb9e834596890d9c6dbb9a6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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
|
||||
@@ -0,0 +1,53 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace SLSFramework.StorySystem
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor.Experimental.GraphView;
|
||||
|
||||
// 节点连接的数据结构
|
||||
[Serializable]
|
||||
public class EdgeData
|
||||
{
|
||||
public string outputNodeGuid;
|
||||
public string outputPortName;
|
||||
public string inputNodeGuid;
|
||||
public string inputPortName;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// 基础节点数据
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
[Serializable]
|
||||
public abstract class BaseNodeData
|
||||
{
|
||||
public string guid;
|
||||
public Vector2 position;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class StartNodeData : BaseNodeData
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EndNodeData : BaseNodeData
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ConditionNodeData : BaseNodeData
|
||||
{
|
||||
public string conditionString = "";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EventNodeData : BaseNodeData
|
||||
{
|
||||
public string eventString = "";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95633a09783e9ad47a4980934e8af4d0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e50c42418f41ae44c81085f2a00e2882
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SLSFramework.StorySystem.Storyline
|
||||
{
|
||||
[CreateAssetMenu(fileName = "NewStorylineGraph", menuName = "StorySystem/Storyline/Storyline Graph")]
|
||||
public class StorylineGraph : GraphBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c87462c2ff921fb4e9e5f52ab691a665
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using SLSFramework.StorySystem.Dialog;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SLSFramework.StorySystem.Storyline
|
||||
{
|
||||
[Serializable]
|
||||
public class StorylineDialogNodeData : BaseNodeData
|
||||
{
|
||||
// 对 DialogGraph 资源的引用
|
||||
public DialogGraph dialogGraph;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8533bcb32514564d98e8c49f29b13ea
|
||||
Reference in New Issue
Block a user