Created
June 20, 2012 18:40
-
-
Save prime31/2961486 to your computer and use it in GitHub Desktop.
Quick and easy endless color cycle using GoKit
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 chain = new TweenChain(); | |
chain.setIterations( -1, LoopType.PingPong ); | |
// colors is an array of Color objects that is settable in the inspector | |
// in this case, we set the cameras background color but this could be light colors, material colors, etc | |
for( var i = 0; i < colors.Length; i++ ) | |
chain.append( new Tween( Camera.mainCamera, 6f, new TweenConfig().colorProp( "backgroundColor", colors[i] ) ) ); | |
chain.play(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment