Advertisement
Guest User

virtual Status update()

a guest
Apr 6th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. virtual Status update()
  2.         {
  3.             // Keep going until a child behavior says it's running.
  4.             for (;;)
  5.             {
  6.                 Status s = (*m_CurrentChild)->tick();
  7.  
  8.                 // If the child fails, or keeps running, do the same.
  9.                 if (s != BH_SUCCESS)
  10.                 {
  11.                     return s;
  12.                 }
  13.  
  14.                 // Hit the end of the array, job done!
  15.                 if (++m_CurrentChild == m_Children.end())
  16.                 {
  17.                     return BH_SUCCESS;
  18.                 }
  19.             }
  20.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement