Skip to content

Instantly share code, notes, and snippets.

@prime31
Created June 20, 2012 18:40
Show Gist options
  • Save prime31/2961486 to your computer and use it in GitHub Desktop.
Save prime31/2961486 to your computer and use it in GitHub Desktop.
Quick and easy endless color cycle using GoKit
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