通用Tween引擎序列

时间:2014-05-22 19:54:22

标签: java libgdx tween

我需要创建一个序列,其中包含以下内容;

对象1在2秒内从A点移动到B点 同时,物体2在一秒内从点c移动到D,并且串行到那个,物体3在一秒内从F移动到G.

如你所见。这需要以下链

Timeline.createSequence()
.beginParallel()
    .push( Tween.set( 1 , XY ).target( B )
    .begingSerial() 
        .push( Tween.to( 2, XY).target( D )
        .push( Tween.to( 3, XY).target( G )
    .end()
.end()

但是" beginSerial()"不存在。我该怎么做?

1 个答案:

答案 0 :(得分:0)

您可以随时将另一个TimeLine推送到原始TimeLine

Timeline.createSequence()
.beginParallel()
    .push( Tween.set( 1 , XY ).target( B )
    .push( Timeline.createSequence()
        .push( Tween.to( 2, XY).target( D )
        .push( Tween.to( 3, XY).target( G )
    .end() )
.end()

希望这有帮助。
祝你好运。