Skip to content

Instantly share code, notes, and snippets.

@miles200
Created April 18, 2018 18:47
Show Gist options
  • Save miles200/9e57421b5699cde3e27cbf9879ff63fd to your computer and use it in GitHub Desktop.
Save miles200/9e57421b5699cde3e27cbf9879ff63fd to your computer and use it in GitHub Desktop.
// When called, this function should set the m_is_flying bit to true. Function has 2 parameters. One to reference the class object
// and one to recieve a true or false bool from the function call.
void markFlying(Entity &e ,bool is_flying)
{
e.m_is_flying = is_flying;
}
// On jump event, call markFlying function with 2 parameters, ??? what to send for Entity &e and sending true for the is_flying bool
case UP: // hold to fly (SPACE keybind)
markFlying(?, true); // Sets player is flying to true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment