画面の上から下に垂直にアニメーションするボタンであるスポットがいくつかあります。
以下を実装しました。
spot.animate().x(x2).y(y2).scaleX(SCALE_X).scaleY(SCALE_Y).setDuration(animationTime).setListener
(
new AnimatorListenerAdapter()
{
@Override
public void onAnimationStart(Animator animation)
{
animators.add(animation);
}
public void onAnimationEnd(Animator animation)
{
animators.remove(animation);
if (!gamePaused )
{
....
}
}
}
);
質問:
ボタンがアニメーションの開始時に加速し、アニメーションの終了時に減速することを発見しました。
LinearInterpolator
アニメーションが移動中に一定の速度になるようにコードを変更するにはどうすればよいでしょうか?
ありがとう!!