Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class IEnemyState {
- public:
- static void apply() {};// = 0;
- };
- class IdleState : public IEnemyState {
- public:
- static void apply() {
- printf("idle state. !!!!!!!!!!!!!!\n");
- }
- };
- class FooState : public IEnemyState {
- public:
- static void apply() {
- printf("foo state. !!!!!!!!!!!!!!\n");
- }
- };
- class EnemyStates {
- public:
- static IdleState Idle;
- static FooState Foo;
- };
- // Instead of a class, we just stick 'em in a namespace.
- namespace Bar {
- IdleState* Idle = new IdleState();
- FooState* Foo = new FooState();
- }
Advertisement
Add Comment
Please, Sign In to add comment