当前位置: 首页>>代码示例>>Java>>正文


Java TweenEquation类代码示例

本文整理汇总了Java中aurelienribon.tweenengine.TweenEquation的典型用法代码示例。如果您正苦于以下问题:Java TweenEquation类的具体用法?Java TweenEquation怎么用?Java TweenEquation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TweenEquation类属于aurelienribon.tweenengine包,在下文中一共展示了TweenEquation类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toColor

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
/**
 * Fades the source color object into the target color in the given time
 *
 * @param sourceColor the source color
 * @param targetColor the target color
 * @param time given decimal time (in seconds)
 * @param equation tween equation
 */
public static void toColor(Color sourceColor, Color targetColor, float time, TweenEquation equation) {
    tweenManager.killTarget(sourceColor, ColorTween.R);
    tweenManager.killTarget(sourceColor, ColorTween.G);
    tweenManager.killTarget(sourceColor, ColorTween.B);
    Tween.to(sourceColor, ColorTween.R, time).ease(equation).target(targetColor.r).start(tweenManager);
    Tween.to(sourceColor, ColorTween.G, time).ease(equation).target(targetColor.g).start(tweenManager);
    Tween.to(sourceColor, ColorTween.B, time).ease(equation).target(targetColor.b).start(tweenManager);
}
 
开发者ID:bitbrain,项目名称:rbcgj-2016,代码行数:17,代码来源:TweenUtils.java

示例2: fadeOut

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
public void fadeOut(float duration, TweenEquation equation, TweenCallback callback) {
    flash.setAlpha(0f);
    tweenManager.killTarget(flash);

    Tween tween = Tween.to(flash, SpriteTween.ALPHA, duration).target(1f).ease(equation);
    if (callback != null) {
        tween.setCallback(callback).setCallbackTriggers(TweenCallback.COMPLETE);
    }
    tween.start(tweenManager);
}
 
开发者ID:bitbrain,项目名称:rbcgj-2016,代码行数:11,代码来源:FX.java

示例3: tween

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
private void tween(float duration, int target, TweenEquation equation) {
	stopAllTweens();
	int i = 0;
	tweens = new Tween[weatherEffect.getEmitters().size];
	for (WeatherParticleEmitter pe : weatherEffect.getEmitters()) {
		tweens[i++] = Tween
			.to(pe, WeatherParticleEmitterTweenAccessor.MAX_PARTICLE_COUNT, duration)
			.ease(equation)
			.target(target)
			.setCallback(this).start(weatherManager.getTweenManager());
	}
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:13,代码来源:Weather.java

示例4: toColor

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
/**
 * Fades the source color object into the target color in the given time
 *
 * @param sourceColor the source color
 * @param targetColor the target color
 * @param time given decimal time (in seconds)
 * @param equation tween equation
 */
public static void toColor(Color sourceColor, Color targetColor, float time, TweenEquation equation) {
   tweenManager.killTarget(sourceColor, ColorTween.R);
   tweenManager.killTarget(sourceColor, ColorTween.G);
   tweenManager.killTarget(sourceColor, ColorTween.B);
   Tween.to(sourceColor, ColorTween.R, time).ease(equation).target(targetColor.r).start(tweenManager);
   Tween.to(sourceColor, ColorTween.G, time).ease(equation).target(targetColor.g).start(tweenManager);
   Tween.to(sourceColor, ColorTween.B, time).ease(equation).target(targetColor.b).start(tweenManager);
}
 
开发者ID:bitbrain,项目名称:braingdx,代码行数:17,代码来源:TweenUtils.java

示例5: startEntryAnimation

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
public void startEntryAnimation(float duration, TweenEquation te)
{		
	Tween.to(this.def, ParticleAccessor.SCALE_XY, duration).
	target(1f).
	ease(te).
	start(tm);
	Tween.to(this.def, ParticleAccessor.ANGLEorALPHA, duration).
	target(1f).
	ease(te).
	start(tm);
}
 
开发者ID:randombot,项目名称:bar,代码行数:12,代码来源:Frame.java

示例6: startEntryAnimation

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
/**
 * Inicia la animaci�n de entrada por defecto establecida segun los datos del constructor, con una duraci�n.
 * 
 * @param tm puntero al manager de tween.
 * @param duration �cu�ntos segundos quieres que dure?
 */
public void startEntryAnimation(float duration, TweenEquation te)
{		
	Tween.to(this.def, ParticleAccessor.POSITION_XY, duration).
	target(this.xStartExit,  this.yStartExit).
	ease(te).
	start(tm);
}
 
开发者ID:randombot,项目名称:bar,代码行数:14,代码来源:Button.java

示例7: fadeIn

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
public void fadeIn(float duration, TweenEquation equation) {
    flash.setAlpha(1f);
    tweenManager.killTarget(flash);
    Tween.to(flash, SpriteTween.ALPHA, duration).target(0f).ease(equation).start(tweenManager);
}
 
开发者ID:bitbrain,项目名称:rbcgj-2016,代码行数:6,代码来源:FX.java

示例8: setTweenEquation

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
public void setTweenEquation(TweenEquation equation) {
    this.equation = equation;
}
 
开发者ID:bitbrain,项目名称:rbcgj-2016,代码行数:4,代码来源:Tooltip.java

示例9: fadeIn

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
public void fadeIn(float duration, TweenEquation equation) {
  flash.setAlpha(1f);
  tweenManager.killTarget(flash);
  Tween.to(flash, SpriteTween.ALPHA, duration).target(0f).ease(equation).start(tweenManager);
}
 
开发者ID:bitbrain,项目名称:clouboy,代码行数:6,代码来源:FX.java

示例10: fadeOut

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
public void fadeOut(float duration, TweenEquation equation) {
  flash.setAlpha(0f);
  tweenManager.killTarget(flash);
  Tween.to(flash, SpriteTween.ALPHA, duration).target(1f).ease(equation).start(tweenManager);
}
 
开发者ID:bitbrain,项目名称:clouboy,代码行数:6,代码来源:FX.java

示例11: moveTo

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
public void moveTo(float x, float y, TweenEquation te) {
	Tween.to(sprite, 0, 0.385f)
	.target(x, y)
	.ease(te)
	.start(BaseScreen.tm);
}
 
开发者ID:randombot,项目名称:bar,代码行数:7,代码来源:Drink.java

示例12: ease

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
public TweenAnimation ease(TweenEquation equation) {
  tween.ease(equation);
  return this;
}
 
开发者ID:bitbrain,项目名称:craft,代码行数:5,代码来源:TweenAnimations.java

示例13: getTweenEquation

import aurelienribon.tweenengine.TweenEquation; //导入依赖的package包/类
/**
 * @return tween equation for the given parameters
 */
private TweenEquation getTweenEquation(EaseEquation easeEquation,
		EaseType easeType) {
	TweenEquation equation;
	int type = easeType == EaseType.IN ? 0 : easeType == EaseType.OUT ? 1
			: 2;
	switch (easeEquation) {
	case LINEAR:
		equation = TweenEquations.easeNone;
		break;
	case QUAD:
		equation = type == 0 ? TweenEquations.easeInQuad
				: type == 1 ? TweenEquations.easeOutQuad
						: TweenEquations.easeInOutQuad;
		break;

	case CUBIC:
		equation = type == 0 ? TweenEquations.easeInCubic
				: type == 1 ? TweenEquations.easeOutCubic
						: TweenEquations.easeInOutCubic;
		break;
	case QUART:
		equation = type == 0 ? TweenEquations.easeInQuart
				: type == 1 ? TweenEquations.easeOutQuart
						: TweenEquations.easeInOutQuart;
		break;
	case QUINT:
		equation = type == 0 ? TweenEquations.easeInQuint
				: type == 1 ? TweenEquations.easeOutQuint
						: TweenEquations.easeInOutQuint;
		break;
	case CIRC:
		equation = type == 0 ? TweenEquations.easeInCirc
				: type == 1 ? TweenEquations.easeOutCirc
						: TweenEquations.easeInOutCirc;
		break;
	case SINE:
		equation = type == 0 ? TweenEquations.easeInSine
				: type == 1 ? TweenEquations.easeOutSine
						: TweenEquations.easeInOutSine;
		break;
	case EXPO:
		equation = type == 0 ? TweenEquations.easeInExpo
				: type == 1 ? TweenEquations.easeOutExpo
						: TweenEquations.easeInOutExpo;
		break;
	case BACK:
		equation = type == 0 ? TweenEquations.easeInBack
				: type == 1 ? TweenEquations.easeOutBack
						: TweenEquations.easeInOutBack;
		break;
	case BOUNCE:
		equation = type == 0 ? TweenEquations.easeInBounce
				: type == 1 ? TweenEquations.easeOutBounce
						: TweenEquations.easeInOutBounce;
		break;
	case ELASTIC:
		equation = type == 0 ? TweenEquations.easeInElastic
				: type == 1 ? TweenEquations.easeOutElastic
						: TweenEquations.easeInOutElastic;
		break;
	default:
		equation = TweenEquations.easeNone;
	}
	return equation;
}
 
开发者ID:e-ucm,项目名称:ead,代码行数:69,代码来源:TweenCreator.java


注:本文中的aurelienribon.tweenengine.TweenEquation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。