Initial commit: Unity WordConnect project

This commit is contained in:
2025-08-01 19:12:05 +08:00
commit f14db75802
3503 changed files with 448337 additions and 0 deletions

View File

@ -0,0 +1,43 @@
using VContainer.Internal;
namespace VContainer.Unity
{
interface IPlayerLoopItem
{
bool MoveNext();
}
sealed class PlayerLoopRunner
{
readonly FreeList<IPlayerLoopItem> runners = new FreeList<IPlayerLoopItem>(16);
int running;
public void Dispatch(IPlayerLoopItem item)
{
runners.Add(item);
}
public void Run()
{
var span =
#if NETSTANDARD2_1
runners.AsSpan();
#else
runners;
#endif
for (var i = 0; i < span.Length; i++)
{
var item = span[i];
if (item != null)
{
var continued = item.MoveNext();
if (!continued)
{
runners.RemoveAt(i);
}
}
}
}
}
}