Skip to content

Instantly share code, notes, and snippets.

@wareya
Created May 20, 2014 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wareya/6e4959c6d1fa3c3e6b77 to your computer and use it in GitHub Desktop.
Save wareya/6e4959c6d1fa3c3e6b77 to your computer and use it in GitHub Desktop.
bool MoveCharacters()
{
for(auto character : Sys::Characters)
{
double &x = character->position->x;
double &y = character->position->y;
if(Input::inputs[Input::RIGHT])
x += 1;
if(Input::inputs[Input::LEFT])
x -= 1;
if(Input::inputs[Input::DOWN])
y += 1;
if(Input::inputs[Input::JUMP])
y -= 1;
};
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment