StateMachine.h 442 B

1234567891011121314151617181920212223
  1. #ifndef INCLUDE_STATEMACHINE_H
  2. #define INCLUDE_STATEMACHINE_H
  3. #include <TINYSTL/vector.h>
  4. #include "State.h"
  5. namespace WalrusRPG
  6. {
  7. class StateMachine
  8. {
  9. protected:
  10. tinystl::vector<WalrusRPG::States::State *> stack;
  11. public:
  12. StateMachine(WalrusRPG::States::State *state);
  13. ~StateMachine();
  14. void push(WalrusRPG::States::State *state);
  15. void pop();
  16. void run();
  17. };
  18. }
  19. #endif