package Icarus.Graphics.Animation;

/**
 * This class enumerates all the possible looping modes for an animation.
 * 
 * @author $Author: asskoala $
 * @version $Revision: 1.1 $ $Date: 2005/12/11 21:07:21 $
 */
public class AnimationType // extends System.Enum //Can't author enums :(
{
	/**
	 * Denotes that the animation is static.
	 */
	public static AnimationType None = new AnimationType("None");

	/**
	 * The animation loops through once, and freezes at the last frame.
	 */
	public static AnimationType LoopOnce = new AnimationType("LoopOnce");

	/**
	 * The animation will loop forever.
	 */
	public static AnimationType LoopForever = new AnimationType("LoopForever");

	private String name;
	private AnimationType(String n) { name = n; }
	public String ToString() { return name; }
	public static AnimationType FromString(String v) 
	{
		if (v.equals("LoopOnce")) return AnimationType.LoopOnce;
		else if (v.equals("LoopForever")) return AnimationType.LoopForever;
		else return AnimationType.None;
	}
}
