Gerard-Meier

Untitled

Mar 11th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. #ifndef ENEMYSTATES_H
  2. #define ENEMYSTATES_H
  3.  
  4. #include "Enemy.h"
  5.  
  6. namespace EnemyStates {
  7.  
  8.     // TODO: move to its own file.
  9.     class IEnemyState {
  10.         public:
  11.             virtual void apply(Enemy * enemy) = 0;
  12.     };
  13.  
  14.     // TODO: move to its own file.
  15.     class IdleState : public IEnemyState {
  16.         public:
  17.             virtual void apply(Enemy * enemy) {
  18.                 printf("idle state. !!!!!!!!!!!!!!\n");
  19.             }
  20.     };
  21.  
  22.     // TODO: move to its own file.
  23.     class FooState : public IEnemyState {
  24.         public:
  25.             virtual void apply(Enemy * enemy) {
  26.                 printf("foo state. !!!!!!!!!!!!!!\n");
  27.             }
  28.     };
  29.  
  30.  
  31.     IdleState* Idle = new IdleState();
  32.     FooState* Foo   = new FooState();
  33. }
  34.  
  35. #endif // ENEMYSTATES_H
Advertisement
Add Comment
Please, Sign In to add comment