Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- virtual Status update()
- {
- // Keep going until a child behavior says it's running.
- for (;;)
- {
- Status s = (*m_CurrentChild)->tick();
- // If the child fails, or keeps running, do the same.
- if (s != BH_SUCCESS)
- {
- return s;
- }
- // Hit the end of the array, job done!
- if (++m_CurrentChild == m_Children.end())
- {
- return BH_SUCCESS;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement