OrNode.cc 282 B

1234567891011121314151617181920
  1. #include <boost/foreach.hpp>
  2. #include "Base/Marcos.h"
  3. #include "LogicTree/OrNode.h"
  4. namespace Egametang {
  5. bool OrNode::Run(LogicContex* contex)
  6. {
  7. foreach(LogicNodeIf* node, nodes)
  8. {
  9. if (node->Run(contex))
  10. {
  11. return true;
  12. }
  13. }
  14. return false;
  15. }
  16. } // namespace Egametang