Skip to content

Instantly share code, notes, and snippets.

@Gazer
Created December 13, 2016 17:38
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 Gazer/d106ad38b4cd858f279f9aac5a0f586d to your computer and use it in GitHub Desktop.
Save Gazer/d106ad38b4cd858f279f9aac5a0f586d to your computer and use it in GitHub Desktop.
Example of bad 'if' usage
cody.jump();
if (GeneralUtils.isSoundEnabled()) {
Sound sound = GameAssetManager.get(JUMPING_SOUND, Sound.class);
sound.play(1.0f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment