Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. public void Update()
  2. {
  3. // すべてのMonoBehaviourを実行
  4. foreach (MyLib.BehaviourData bdata in behaviourDict.Values)
  5. {
  6. if (!bdata.mainloopBegan)
  7. {
  8. bdata.behaviour.Start();
  9. bdata.mainloopBegan = true;
  10. }
  11.  
  12. bdata.behaviour.Update();
  13. }
  14.  
  15. foreach (MyLib.BehaviourData bdata in behaviourDict.Values)
  16. {
  17. LinkedListNode<MyLib.Coroutine> node = bdata.routineList.First;
  18. while (node != null)
  19. {
  20. MyLib.Coroutine coroutine = node.Value;
  21. if (!coroutine.routine.MoveNext())
  22. {
  23. var currentNode = node;
  24. node = node.Next;
  25. bdata.routineList.Remove(currentNode);
  26. }
  27. else
  28. {
  29. node = node.Next;
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement