GameEvents.h 506 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef EVENT_GAMEEVENTS_H
  2. #define EVENT_GAMEEVENTS_H
  3. #include <boost/foreach.hpp>
  4. #include "Base/Marcos.h"
  5. namespace Egametang {
  6. enum
  7. {
  8. SPELL_START = 0,
  9. SPELL_FINISH = 1,
  10. ADD_BUFF = 2,
  11. REMOVE_BUFF = 3,
  12. };
  13. class GameEvents
  14. {
  15. private:
  16. ConditionFactory factories;
  17. std::vector<std::list<Event> > events;
  18. public:
  19. GameEvents();
  20. ~GameEvents();
  21. void AddEvent(EventConf& conf);
  22. void Excute(int type, ContexIf* contex);
  23. };
  24. } // namespace Egametang
  25. #endif // EVENT_GAMEEVENTS_H