SequenceNode.h 625 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef BEHAVIORTREE_SEQUENCENODE_H
  2. #define BEHAVIORTREE_SEQUENCENODE_H
  3. #include <list>
  4. #include "BehaviorTree/BehaviorNode.h"
  5. namespace Egametang {
  6. class SequenceNode: public BehaviorNode
  7. {
  8. private:
  9. std::list<BehaviorNode*> nodes;
  10. public:
  11. SequenceNode(int32 type);
  12. virtual ~SequenceNode();
  13. virtual bool Run(ContexIf* contex);
  14. virtual void AddChildNode(BehaviorNode *node);
  15. virtual std::string ToString();
  16. };
  17. class SequenceNodeFactory: public BehaviorNodeFactoryIf
  18. {
  19. public:
  20. virtual BehaviorNode* GetInstance(const BehaviorNodeConf& conf);
  21. };
  22. } // namespace Egametang
  23. #endif // BEHAVIORTREE_SEQUENCENODE_H