daily update on 20230713 by nitload youmu, linkedlistbug fixed

This commit is contained in:
Nitload
2023-07-13 06:35:38 +08:00
parent 2a78a60358
commit 01d1b7e7ef
88 changed files with 1388 additions and 1159 deletions
+27 -10
View File
@@ -9,7 +9,7 @@ namespace StgSharp.Control
{
[AllowNull]
internal static Pool _currentPool = default;
internal static LinkedList<Pool> allPool;
internal static LinkedList<Pool> allPool = new LinkedList<Pool>();
internal static LinkedList<Form> allForm;
/// <summary>
@@ -21,30 +21,36 @@ namespace StgSharp.Control
internal static TimelineBlock currentOperation;
private static bool isPaused = false;
public static TimelineBlock CurrentOperation
{
get { return currentOperation; }
set
{
if (currentOperation==default||
currentOperation.isComplete)
{
currentOperation = value;
}
}
}
static TimeLine()
{
allForm = new LinkedList<Form>();
allPool = new LinkedList<Pool>();
#if DEBUG
Console.WriteLine("Timeline init OK!");
#endif
internalIO.InternalInitGL();
}
internal static void OnRender()
public static void OnRender()
{
tickCounter.QuickAdd();
foreach (Pool p in allPool)
{
_currentPool = p;
if (!isPaused)
if (!currentOperation.isComplete)
{
currentOperation.OnUpdating();
}
foreach (EntityPartical b in _currentPool._bulletContainer)
{
}
}
}
@@ -58,5 +64,16 @@ namespace StgSharp.Control
{
}
public static void LoadPool(Pool pool)
{
allPool.Add(pool);
Console.WriteLine(allPool.count.Value);
}
public static Pool GetCurrentPool()
{
return _currentPool;
}
}
}