【a】可视化剧本编辑器 10.StoryEditor
This commit is contained in:
25
Assets/10.StoryEditor/RunTime/Data/Node/BeginNodeData.cs
Normal file
25
Assets/10.StoryEditor/RunTime/Data/Node/BeginNodeData.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Stary.Evo.StoryEditor
|
||||
{
|
||||
[Serializable]
|
||||
public class BeginNodeData : NodeData
|
||||
{
|
||||
public List<int> next = new();
|
||||
|
||||
public BeginNodeData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BeginNodeData(NodeData data)
|
||||
{
|
||||
name = data.name;
|
||||
type = NodeType.Begin;
|
||||
}
|
||||
|
||||
public new BeginNodePlayer GetPlayer(GraphPlayer graph)=>
|
||||
new(graph, this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc62c71e8fb75c24eb096c74a651309d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
25
Assets/10.StoryEditor/RunTime/Data/Node/EndNodeData.cs
Normal file
25
Assets/10.StoryEditor/RunTime/Data/Node/EndNodeData.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Stary.Evo.StoryEditor
|
||||
{
|
||||
[Serializable]
|
||||
public class EndNodeData : NodeData
|
||||
{
|
||||
public List<int> pre = new();
|
||||
|
||||
public EndNodeData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public EndNodeData(NodeData data)
|
||||
{
|
||||
name = data.name;
|
||||
type = NodeType.End;
|
||||
}
|
||||
|
||||
public new EndNodePlayer GetPlayer(GraphPlayer graph) =>
|
||||
new(graph, this);
|
||||
}
|
||||
}
|
||||
11
Assets/10.StoryEditor/RunTime/Data/Node/EndNodeData.cs.meta
Normal file
11
Assets/10.StoryEditor/RunTime/Data/Node/EndNodeData.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 407d564c2ca4c65499f8bf38949aec58
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
34
Assets/10.StoryEditor/RunTime/Data/Node/FlowNodeData.cs
Normal file
34
Assets/10.StoryEditor/RunTime/Data/Node/FlowNodeData.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Stary.Evo.StoryEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// 空节点(流程节点)数据
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class FlowNodeData : NodeData
|
||||
{
|
||||
public List<int> pre = new();
|
||||
public List<int> next = new();
|
||||
|
||||
/// <summary>
|
||||
/// 后续连接执行类型
|
||||
/// </summary>
|
||||
public NodeExecuteType executeType = NodeExecuteType.Async;
|
||||
|
||||
public FlowNodeData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public FlowNodeData(NodeData data)
|
||||
{
|
||||
name = data.name;
|
||||
type = NodeType.Empty;
|
||||
}
|
||||
|
||||
public new FlowNodePlayer GetPlayer(GraphPlayer graph)=>
|
||||
new(graph, this);
|
||||
}
|
||||
}
|
||||
11
Assets/10.StoryEditor/RunTime/Data/Node/FlowNodeData.cs.meta
Normal file
11
Assets/10.StoryEditor/RunTime/Data/Node/FlowNodeData.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0bafbcc38995f04c9189cc5a1491099
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
23
Assets/10.StoryEditor/RunTime/Data/Node/NodeData.cs
Normal file
23
Assets/10.StoryEditor/RunTime/Data/Node/NodeData.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
|
||||
namespace Stary.Evo.StoryEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// 节点数据
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class NodeData
|
||||
{
|
||||
/// <summary>
|
||||
/// 节点名称
|
||||
/// </summary>
|
||||
public string name = "Unnamed Node";
|
||||
/// <summary>
|
||||
/// 节点类型
|
||||
/// </summary>
|
||||
public NodeType type = NodeType.Empty;
|
||||
|
||||
public NodePlayer GetPlayer(GraphPlayer graph)=>
|
||||
new(graph, this);
|
||||
}
|
||||
}
|
||||
11
Assets/10.StoryEditor/RunTime/Data/Node/NodeData.cs.meta
Normal file
11
Assets/10.StoryEditor/RunTime/Data/Node/NodeData.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d46e1dcd9310eed41a27d6e0c8c5066b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
|
||||
namespace Stary.Evo.StoryEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// 剧本段落节点数据
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ScriptParagraphNodeData : FlowNodeData
|
||||
{
|
||||
/// <summary>
|
||||
/// 字幕路径
|
||||
/// </summary>
|
||||
public ResourcePathData captionPath;
|
||||
/// <summary>
|
||||
/// 语音路径
|
||||
/// </summary>
|
||||
public ResourcePathData audioPath;
|
||||
|
||||
public ScriptParagraphNodeData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ScriptParagraphNodeData(FlowNodeData data) : base(data)
|
||||
{
|
||||
type = NodeType.Paragraph;
|
||||
executeType = data.executeType;
|
||||
}
|
||||
|
||||
public new ScriptParagraphNodePlayer GetPlayer(GraphPlayer graph) =>
|
||||
new(graph,this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2ddf1032a2ad2541ab9ddae9772d0d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user