AndNode.cc 289 B

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