Skip to content

Instantly share code, notes, and snippets.

@ken0nek
Created June 24, 2016 15:53
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 ken0nek/b7628865fe2944980eff44ae4be4f595 to your computer and use it in GitHub Desktop.
Save ken0nek/b7628865fe2944980eff44ae4be4f595 to your computer and use it in GitHub Desktop.
fater
var result: [(hasSmile: Bool, leftEyeClosed: Bool, rightEyeClosed: Bool)] = []
for feature in features as! [CIFaceFeature] {
result.append((feature.hasSmile, feature.leftEyeClosed, feature.rightEyeClosed))
}
if result.count >= 1 {
if result[0].hasSmile {
self.playerAttack()
if result[0].leftEyeClosed || result[0].rightEyeClosed {
self.heal()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment