Created
December 22, 2014 13:07
-
-
Save gmodecorp/49d16ae037848fc766d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment