Created
September 1, 2016 14:32
-
-
Save alsedi/ddbe88d940089f7c90bc944b861e62f3 to your computer and use it in GitHub Desktop.
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
func animate() { | |
if shapes.count == 0 { | |
generateShapes() | |
} | |
for i in 0..<shapes.count { | |
let delay = (i % 2 == 0) ? Double(i+1)/5.5 : Double(i+1)/5.505 | |
shapes[i].animate(duration: 5.0, delay: delay) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment