class InkAnimHelper
{

	public static function GetDef_Transparency( startAlpha : Float, endAlpha : Float, duration : Float, delay : Float, type : inkanimInterpolationType, mode : inkanimInterpolationMode ) : inkAnimDef
	{
		var alphaInterpol : inkAnimTransparency;
		var definition : inkAnimDef;
		definition = new inkAnimDef;
		alphaInterpol = new inkAnimTransparency;
		alphaInterpol.SetStartTransparency( startAlpha );
		alphaInterpol.SetEndTransparency( endAlpha );
		alphaInterpol.SetDuration( duration );
		alphaInterpol.SetStartDelay( delay );
		alphaInterpol.SetType( type );
		alphaInterpol.SetMode( mode );
		definition.AddInterpolator( alphaInterpol );
		return definition;
	}

	public static function GetDef_Blink( startAlpha : Float, endAlpha : Float, duration : Float, delay : Float, type : inkanimInterpolationType, mode : inkanimInterpolationMode ) : inkAnimDef
	{
		var definition : inkAnimDef;
		var alphaBlinkInInterpol : inkAnimTransparency;
		var alphaBlinkOutInterpol : inkAnimTransparency;
		var halfDuration : Float;
		halfDuration = duration / 2.0;
		definition = new inkAnimDef;
		alphaBlinkInInterpol = new inkAnimTransparency;
		alphaBlinkInInterpol.SetStartTransparency( startAlpha );
		alphaBlinkInInterpol.SetEndTransparency( endAlpha );
		alphaBlinkInInterpol.SetDuration( halfDuration );
		alphaBlinkInInterpol.SetStartDelay( delay );
		alphaBlinkInInterpol.SetType( type );
		alphaBlinkInInterpol.SetMode( mode );
		alphaBlinkOutInterpol = new inkAnimTransparency;
		alphaBlinkOutInterpol.SetStartTransparency( endAlpha );
		alphaBlinkOutInterpol.SetEndTransparency( startAlpha );
		alphaBlinkOutInterpol.SetStartDelay( halfDuration );
		alphaBlinkOutInterpol.SetDuration( delay + halfDuration );
		alphaBlinkOutInterpol.SetType( type );
		alphaBlinkOutInterpol.SetMode( mode );
		definition.AddInterpolator( alphaBlinkInInterpol );
		definition.AddInterpolator( alphaBlinkOutInterpol );
		return definition;
	}

}

