重构了底层,方便向Android、Web、Linux进行跨平台迁移

This commit is contained in:
fengjiayi
2024-09-15 12:15:32 +08:00
parent 0271825fa9
commit 19247b5afe
51 changed files with 4987 additions and 1526 deletions

View File

@@ -9,13 +9,17 @@ namespace Serein.Library.Core.NodeFlow
/// </summary>
public class DynamicContext: IDynamicContext
{
public DynamicContext(ISereinIoc sereinIoc)
public DynamicContext(ISereinIoc sereinIoc, IFlowEnvironment flowEnvironment)
{
SereinIoc = sereinIoc;
FlowEnvironment = flowEnvironment;
}
public NodeRunCts NodeRunCts { get; set; }
public ISereinIoc SereinIoc { get; }
public IFlowEnvironment FlowEnvironment { get; }
public Task CreateTimingTask(Action action, int time = 100, int count = -1)
{
NodeRunCts ??= SereinIoc.GetOrInstantiate<NodeRunCts>();

View File

@@ -66,7 +66,7 @@ namespace Serein.Library.Core.NodeFlow
public class FlipflopContext : IFlipflopContext
{
public FlowStateType State { get; set; }
//public TResult? Data { get; set; }
public object Data { get; set; }
public FlipflopContext(FlowStateType ffState)