Created
June 24, 2016 15:53
-
-
Save ken0nek/b7628865fe2944980eff44ae4be4f595 to your computer and use it in GitHub Desktop.
fater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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