Skip to content

Instantly share code, notes, and snippets.

@luizdepra
Created August 17, 2012 19:23
Show Gist options
  • Save luizdepra/3381773 to your computer and use it in GitHub Desktop.
Save luizdepra/3381773 to your computer and use it in GitHub Desktop.
StateMachine State
#ifndef __STATE_H__
#define __STATE_H__
#include <string>
class State
{
public:
State(const std::string &name, void (*startFunction)(), void (*updateFunction)(float), void (*stopFunction)());
~State();
std::string getName();
void start();
void update(float delta);
void stop();
private:
std::string _name;
void (*_startFunction);
void (*_updateFunction)(float);
void (*_stopFunction)();
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment