daily uodate on 20231208 by nitload youmu, preparation for multi thread rendering
This commit is contained in:
@@ -2,17 +2,19 @@
|
||||
using StgSharp.Graphics;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading;
|
||||
|
||||
namespace StgSharp.Controlling
|
||||
{
|
||||
public static partial class TimeLine
|
||||
{
|
||||
public const long version = 10;
|
||||
|
||||
internal static Pool _currentPool = default;
|
||||
internal static LinkedList<Pool> allPool = new LinkedList<Pool>();
|
||||
public const long version = 430;
|
||||
internal static LinkedList<Form> allForm;
|
||||
|
||||
private static SemaphoreSlim ping;
|
||||
private static SemaphoreSlim pong;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Tick counter count the frames passed since the program start.
|
||||
/// </summary>
|
||||
@@ -24,15 +26,14 @@ namespace StgSharp.Controlling
|
||||
static unsafe TimeLine()
|
||||
{
|
||||
allForm = new LinkedList<Form>();
|
||||
allPool = new LinkedList<Pool>();
|
||||
}
|
||||
|
||||
public static TimelineBlock CurrentOperation
|
||||
{
|
||||
get { return currentOperation; }
|
||||
set
|
||||
set
|
||||
{
|
||||
if (currentOperation==default||
|
||||
if (currentOperation == default ||
|
||||
currentOperation.isComplete)
|
||||
{
|
||||
currentOperation = value;
|
||||
@@ -40,39 +41,20 @@ namespace StgSharp.Controlling
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnRender()
|
||||
public static void TimelineMain()
|
||||
{
|
||||
tickCounter.QuickAdd();
|
||||
foreach (Pool p in allPool)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
internal static void UodateAllFrame()
|
||||
{
|
||||
foreach (Form item in allForm)
|
||||
{
|
||||
_currentPool = p;
|
||||
if (!currentOperation.isComplete)
|
||||
{
|
||||
currentOperation.OnUpdating();
|
||||
}
|
||||
item.formThread.Start();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void InitProgram()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static unsafe void StartProgram()
|
||||
{
|
||||
}
|
||||
|
||||
public static void LoadPool(Pool pool)
|
||||
{
|
||||
allPool.Add(pool);
|
||||
Console.WriteLine(allPool.count.Value);
|
||||
}
|
||||
|
||||
public static Pool GetCurrentPool()
|
||||
{
|
||||
return _currentPool;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user