package speiger.src.coreengine.rendering.guiOld.helper.animations;

import speiger.src.coreengine.rendering.guiOld.GuiComponent;

public enum AnimationTarget
{
	XPOS,
	YPOS,
	WIDTH,
	HEIGHT,
	SCALE,
	VISIBILITY;
	
	public void apply(Animator animator, float amount)
	{
		switch(this)
		{
			case XPOS:
				animator.modifyX(amount);
				break;
			case YPOS:
				animator.modifyY(amount);
				break;
			case HEIGHT: 
				animator.modifyHeight(amount);
				break;
			case WIDTH:
				animator.modifyWidth(amount);
				break;
			case SCALE:
				animator.modifyScale(amount);
				break;
			case VISIBILITY:
				animator.modifyVisibility(amount);
				break;
		}
	}
	
	public float getBase(GuiComponent comp)
	{
		switch(this)
		{
			case XPOS: return 0;
			case YPOS: return 0;
			case WIDTH: return 0;
			case HEIGHT: return 0;
			case SCALE: return 1;
			case VISIBILITY: return 1;
		}
		return 0F;
	}
}