Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Update()
- {
- // すべてのMonoBehaviourを実行
- foreach (MyLib.BehaviourData bdata in behaviourDict.Values)
- {
- if (!bdata.mainloopBegan)
- {
- bdata.behaviour.Start();
- bdata.mainloopBegan = true;
- }
- bdata.behaviour.Update();
- }
- foreach (MyLib.BehaviourData bdata in behaviourDict.Values)
- {
- LinkedListNode<MyLib.Coroutine> node = bdata.routineList.First;
- while (node != null)
- {
- MyLib.Coroutine coroutine = node.Value;
- if (!coroutine.routine.MoveNext())
- {
- var currentNode = node;
- node = node.Next;
- bdata.routineList.Remove(currentNode);
- }
- else
- {
- node = node.Next;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement