Skip to content

Instantly share code, notes, and snippets.

@LoganBarnett
Created December 17, 2010 02:10
Show Gist options
  • Save LoganBarnett/744368 to your computer and use it in GitHub Desktop.
Save LoganBarnett/744368 to your computer and use it in GitHub Desktop.
/// <summary>
/// Desires the direction.
/// </summary>
/// <returns>
/// The direction.
/// </returns>
/// <param name='direction'>
/// If set to <c>true</c> direction.
/// </param>
bool DesireDirection(Direction direction) {
if (playerFacer.IsFacing(direction)) return playerMovement.AttemptMove(direction);
else {
Face(direction);
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment