动画视图上的狮子座粒子动画

时间:2018-12-17 19:13:03

标签: java android animation particle-system

您好,我正在制作一个可以对图像视图进行动画处理的Android应用,当动画完成后,它们应该会爆炸。使用Leonids粒子系统获取爆炸动画Im。但是爆炸出现在动画视图上完全不同的位置。在固定视图上工作正常。

谢谢

在动画对象中(图像是ImageView):

animation = ObjectAnimator.ofFloat(image, "translationY", fall_distance*11);
        animation.setDuration(fall_time*12);
        animation.setInterpolator(new LinearInterpolator());
        animation.addListener(new AnimatorListenerAdapter() {
            public void onAnimationEnd(Animator animation) {


                Play.explosion1.oneShot(image, 300);



            }
        });

在名为“ Play”的onCreate活动中

explosion1= new  ParticleSystem(this, 600, R.drawable.dot , 500)
                .setSpeedRange(0.1f, 0.3f); 

0 个答案:

没有答案
相关问题