简体   繁体   中英

Universal Tween Engine Serial sequence

I need to create a sequence where we have the following;

object 1 moves from point A to point B in 2 seconds at the same time, object 2 moves from point c to D in one second, and serial to that, object 3 moves from F to G in one second.

As you can see. This needs the following chain

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()

But "beginSerial()" does not exists. How do I do this ?

You can always push another TimeLine into the original 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()

Hope this helps.
Good Luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM