Skip to content

Instantly share code, notes, and snippets.

@veeneck
Created April 7, 2014 14:35
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 veeneck/10021486 to your computer and use it in GitHub Desktop.
Save veeneck/10021486 to your computer and use it in GitHub Desktop.
Sprite Kit Getters & Setters
// in header file
BOOL isDying;
// in subclass where object is referenced
// for example, enemy = (Character*)target
if(enemy->isDying) {
}
// VS a getter in header
@property (nonatomic, getter=isDying) BOOL dying;
// in class
if(enemy.dying) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment