【a】可视化剧本编辑器 10.StoryEditor

This commit is contained in:
mzh
2026-01-06 14:24:23 +08:00
parent f055116d4d
commit 2e8accfed8
80 changed files with 3145 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace Stary.Evo.StoryEditor
{
public class EndNodePlayer : NodePlayer
{
public new EndNodeData Data;
public List<NodePlayer> Pre = new();
public EndNodePlayer(GraphPlayer graph, EndNodeData data) : base(graph, data)
{
Data = data;
}
public override bool Connect()
{
if(!base.Connect())
return false;
Data.pre.ForEach(index => Pre.Add(Graph.Nodes[index]));
return true;
}
public override UniTask Execute()
{
Init();
Debug.Log($"剧本执行完成: {Graph.Name}");
// 标记剧本完成
Graph.Finished = true;
ScriptPlayer.ReleaseGraph();
return base.Execute();
}
}
}