using UnityEngine; using System; using System.Collections; using System.Collections.Generic; public class GoTweenCollectionConfig { public int id; // id for finding the Tween at a later time. multiple Tweens can have the same id public int iterations = 1; // number of times to iterate. -1 will loop indefinitely public GoLoopType loopType = Go.defaultLoopType; public GoUpdateType propertyUpdateType = Go.defaultUpdateType; public Action onInitHandler; public Action onBeginHandler; public Action onIterationStartHandler; public Action onUpdateHandler; public Action onIterationEndHandler; public Action onCompleteHandler; /// /// sets the number of iterations. setting to -1 will loop infinitely /// public GoTweenCollectionConfig setIterations( int iterations ) { this.iterations = iterations; return this; } /// /// sets the number of iterations and the loop type. setting to -1 will loop infinitely /// public GoTweenCollectionConfig setIterations( int iterations, GoLoopType loopType ) { this.iterations = iterations; this.loopType = loopType; return this; } /// /// sets the update type for the Tween /// public GoTweenCollectionConfig setUpdateType( GoUpdateType setUpdateType ) { this.propertyUpdateType = setUpdateType; return this; } /// /// sets the onInit handler for the Tween /// public GoTweenCollectionConfig onInit( Action onInit ) { onInitHandler = onInit; return this; } /// /// sets the onBegin handler for the Tween /// public GoTweenCollectionConfig onBegin( Action onBegin ) { onBeginHandler = onBegin; return this; } /// /// sets the onIterationStart handler for the Tween /// public GoTweenCollectionConfig onIterationStart( Action onIterationStart ) { onIterationStartHandler = onIterationStart; return this; } /// /// sets the onUpdate handler for the Tween /// public GoTweenCollectionConfig onUpdate( Action onUpdate ) { onUpdateHandler = onUpdate; return this; } /// /// sets the onIterationEnd handler for the Tween /// public GoTweenCollectionConfig onIterationEnd( Action onIterationEnd ) { onIterationEndHandler = onIterationEnd; return this; } /// /// sets the onComplete handler for the Tween /// public GoTweenCollectionConfig onComplete( Action onComplete ) { onCompleteHandler = onComplete; return this; } /// /// sets the id for the Tween. Multiple Tweens can have the same id and you can retrieve them with the Go class /// public GoTweenCollectionConfig setId( int id ) { this.id = id; return this; } }