我如何在Java中吐温? [英] How do I tween in Java?

查看:153
本文介绍了我如何在Java中吐温?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我寻找到做在Java中的2D游戏,我碰到的动画一个问题:我该怎么办的渐变?是否有任何库,或者也可以是我能找到的绑定?

I'm looking into making a 2D game in Java and I've run into a problem with animation: how do I do tweening in Java? Are there any libraries or maybe something I can find bindings for?

另外,请大家明白,我不想简单地移动图像,我想这样做的方式,对动画制作的图纸时,我可以用几个关键帧,以填补在中间帧生成动画变形

Also, please understand that I do not want to simply move an image, I want to do morphing in a way that when making drawings for animation I can use a few keyframes to fill in the in-between frames to generate the animation.

推荐答案

我建立了一个通用吐温引擎的Java:
HTTP://$c$c.google.com/p/ Java的通用吐温引擎/

I built an Universal Tween Engine for Java: http://code.google.com/p/java-universal-tween-engine/

吐温可以应用到每一个对象(不只是图形对象,应有尽有!),每个对象属性可补间,它支持所有的罗伯特·彭纳缓和方程了。

Tweens can be applied to every object (no just graphics objects, everything!), every object attribute can be tweened, and it supports every Robert Penner easing equation too.

而且,发动机被优化以不实例在运行任何东西(除了初始化期间),所以它可用于Android游戏而不用担心垃圾收集

Also, the engine is optimized to not instantiate anything at runtime (except during initialization), so it can be used for Android games without fearing the garbage collector.

这篇关于我如何在Java中吐温?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆