Event.h 520 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef EVENT_EVENT_H
  2. #define EVENT_EVENT_H
  3. #include "Event/NodeIf.h"
  4. namespace Egametang {
  5. class EventNode;
  6. class NodeFactories;
  7. class ConditionConf;
  8. class EventConf;
  9. class Event
  10. {
  11. private:
  12. int type;
  13. NodeIf* condition;
  14. NodeIf* action;
  15. void BuildTree(
  16. NodeFactories& factories, const EventNode& conf,
  17. NodeIf*& condition);
  18. public:
  19. Event(NodeFactories& factories, EventConf& conf);
  20. ~Event();
  21. void Run(ContexIf* contex);
  22. std::string ToString();
  23. };
  24. } // namespace Egametang
  25. #endif // EVENT_EVENT_H