daily update on 20240828 by nitload youmu, autotexture added
This commit is contained in:
@@ -38,11 +38,12 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Logic
|
||||
namespace StgSharp.BluePrint
|
||||
{
|
||||
|
||||
public class BlueprintPipeline
|
||||
{
|
||||
|
||||
private BlueprintNode after;
|
||||
private BlueprintNode former;
|
||||
private BlueprintPipelineArgs args;
|
||||
@@ -59,14 +60,55 @@ namespace StgSharp.Logic
|
||||
|
||||
public BlueprintNode Former => former;
|
||||
|
||||
public int Level => former.Level;
|
||||
|
||||
public BlueprintPipelineArgs Args
|
||||
{
|
||||
get => args;
|
||||
set => args = value;
|
||||
}
|
||||
|
||||
public int Level => former.Level;
|
||||
|
||||
public static void SkipAll(Dictionary<string, BlueprintPipeline> ports)
|
||||
{
|
||||
if (ports == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(ports));
|
||||
}
|
||||
foreach (KeyValuePair<string, BlueprintPipeline> item in ports)
|
||||
{
|
||||
if (item.Value != null)
|
||||
{
|
||||
item.Value.CompleteAndSkip();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void WaitAll(Dictionary<string, BlueprintPipeline> ports)
|
||||
{
|
||||
if (ports == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(ports));
|
||||
}
|
||||
foreach (KeyValuePair<string, BlueprintPipeline> item in ports)
|
||||
{
|
||||
if (item.Value != null)
|
||||
{
|
||||
item.Value.WaitForStart();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void WaitForStart()
|
||||
{
|
||||
//Console.WriteLine($"Waiting \t{former.ContextName}\t->\t{after.ContextName}");
|
||||
formerCompleteSemaphore.Wait();
|
||||
}
|
||||
|
||||
~BlueprintPipeline()
|
||||
{
|
||||
formerCompleteSemaphore.Dispose();
|
||||
}
|
||||
|
||||
#region pipline op
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
@@ -85,52 +127,13 @@ namespace StgSharp.Logic
|
||||
|
||||
#endregion
|
||||
|
||||
public static void SkipAll(Dictionary<string, BlueprintPipeline> ports)
|
||||
{
|
||||
if (ports == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(ports));
|
||||
}
|
||||
foreach (var item in ports)
|
||||
{
|
||||
if (item.Value!=null)
|
||||
{
|
||||
item.Value.CompleteAndSkip();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void WaitAll(Dictionary<string, BlueprintPipeline> ports)
|
||||
{
|
||||
if (ports == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(ports));
|
||||
}
|
||||
foreach (var item in ports)
|
||||
{
|
||||
if (item.Value!=null)
|
||||
{
|
||||
item.Value.WaitForStart();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void WaitForStart()
|
||||
{
|
||||
//Console.WriteLine($"Waiting \t{former.ContextName}\t->\t{after.ContextName}");
|
||||
formerCompleteSemaphore.Wait();
|
||||
}
|
||||
|
||||
~BlueprintPipeline()
|
||||
{
|
||||
formerCompleteSemaphore.Dispose();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public abstract class BlueprintPipelineArgs
|
||||
{
|
||||
|
||||
public object? Value { get; set; }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user