gdx-studio

#libgdx#java#desktop

git clone https://git.pyrossh.dev/gdx-studio

An IDE for creating Games using libgdx and Java supported on all platforms Android, iOS, Desktop


src/scene2d/InterpolationType.java
a9b2a64 1
package scene2d;
a62d533 2
import com.badlogic.gdx.math.Interpolation;
a62d533 3
a62d533 4
a62d533 5
public enum InterpolationType {
a62d533 6
	Bounce, BounceIn, BounceOut, Circle, CircleIn, CircleOut, 
a62d533 7
	Elastic, ElasticIn, ElasticOut, Exp10, Exp10In, Exp10Out, 
a62d533 8
	Exp5, Exp5In, Exp5Out, Linear, Fade,
a62d533 9
	Pow2, Pow2In, Pow2Out, Pow3, Pow3In, Pow3Out,
a62d533 10
	Pow4, Pow4In, pow4Out, Pow5, Pow5In, Pow5Out, 
a62d533 11
	Sine, SineIn, SineOut, Swing, SwingIn, SwingOut;
a62d533 12
	
a62d533 13
	public static InterpolationType getInterpolationType(Interpolation interpolation){
a62d533 14
		for(int i=0;i<Effect.interpolationsValue.length;i++)
a62d533 15
			if(Effect.interpolationsValue[i].equals(getInterpolation(InterpolationType.values()[i])))
a62d533 16
				return InterpolationType.values()[i];
a62d533 17
		return InterpolationType.Linear;
a62d533 18
	}
a62d533 19
	
a62d533 20
	public static Interpolation getInterpolation(InterpolationType type){
a62d533 21
		for(int i=0;i<InterpolationType.values().length;i++)
a62d533 22
			if(type.equals(InterpolationType.values()[i]))
a62d533 23
					return Effect.interpolationsValue[i];
a62d533 24
		return Interpolation.linear;
a62d533 25
	}
a62d533 26
	
a62d533 27
	public static Interpolation getInterpolation(String typename){
a62d533 28
		return getInterpolation(InterpolationType.valueOf(typename));
a62d533 29
	}
a62d533 30
}