mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-07 19:38:13 -05:00
add VRM scripts
This commit is contained in:
30
Scripts/UniTask/StepScheduler.cs
Normal file
30
Scripts/UniTask/StepScheduler.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
namespace UniTask
|
||||
{
|
||||
public class StepScheduler : IScheduler
|
||||
{
|
||||
LockQueue<TaskChain> m_taskQueue = new LockQueue<TaskChain>();
|
||||
public void Enqueue(TaskChain item)
|
||||
{
|
||||
m_taskQueue.Enqueue(item);
|
||||
}
|
||||
|
||||
TaskChain m_chain;
|
||||
public int UpdateAndGetTaskCount()
|
||||
{
|
||||
if (m_chain != null)
|
||||
{
|
||||
var status=m_chain.Next();
|
||||
if(status==ExecutionStatus.Continue)
|
||||
{
|
||||
// m_item継続中
|
||||
return m_taskQueue.Count;
|
||||
}
|
||||
m_chain = null;
|
||||
}
|
||||
|
||||
int count;
|
||||
m_chain = m_taskQueue.Dequeue(out count);
|
||||
return count;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user