Skip to content

Instantly share code, notes, and snippets.

@MrSapps
Created September 5, 2016 00:39
Show Gist options
  • Save MrSapps/4b03db4d76101c575ac9192d53c18936 to your computer and use it in GitHub Desktop.
Save MrSapps/4b03db4d76101c575ac9192d53c18936 to your computer and use it in GitHub Desktop.
struct StateCondition
{
std::string mName;
std::function<bool()> mCondition;
};
struct StateEntry
{
std::string mName;
std::vector<StateCondition> mTos;
};
static bool LeftPressed()
{
return false;
}
const StateEntry events[] =
{
{ "StandIdle",
{
{"ToWalk", LeftPressed },
{ "PushOnWall", nullptr },
{ "ToCrouch", nullptr },
{ "JumpUp", nullptr },
{ "ToHop", nullptr },
{ "PullLever", nullptr },
{ "EnterDoor", nullptr },
{ "EnterMineCar", nullptr },
{ "ToGrabLiftRope", nullptr },
{ "ToThrow", nullptr }
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment