/// <summary> /// Creates and starts a twitch. /// </summary> /// <typeparam name="T">The type of twitch.</typeparam> /// <param name="startValue"></param> /// <param name="targetValue"></param> /// <param name="set">Set delegate called each frame to set the current value.</param> /// <param name="duration">Time for twitch to take.</param> /// <param name="shape">Curve shape.</param> /// <param name="param">User defined param used w/ onComplete</param> /// <param name="onComplete">Event handler triggered when twitch completes.</param> /// <param name="useGameTime">By default twitches used WallClockTime since they're generally used for UI. Set this to true if you want the twitch to run off of GameTime</param> public static int CreateTwitch <T>(T startValue, T targetValue, Set <T> set, double duration, TwitchCurve.Shape shape, Object param, TwitchCompleteEvent onComplete, bool useGameTime) where T : struct { return(Twitch <T> .CreateTwitch(startValue, targetValue, set, duration, shape, param, onComplete, null, useGameTime)); }
// // CreateTwitch methods. These should be the only public interface... // /// <summary> /// Creates and starts a twitch. /// </summary> /// <typeparam name="T">The type of twitch.</typeparam> /// <param name="startValue"></param> /// <param name="targetValue"></param> /// <param name="set">Set delegate called each frame to set the current value.</param> /// <param name="duration">Time for twitch to take.</param> /// <param name="shape">Curve shape.</param> public static int CreateTwitch <T>(T startValue, T targetValue, Set <T> set, double duration, TwitchCurve.Shape shape) where T : struct { return(Twitch <T> .CreateTwitch(startValue, targetValue, set, duration, shape, null, null, null, false)); }