Panning animation for a special background

Hi!..

I have my background, is a long stripe, a 4096 (h) x 768 (w) .jpg file, what i´m looking is to animate panning from begin to finish and then repeat it, say:

  1. Move the bg from x450 to -x450
  2. wait untill finished
  3. set bg position to x450
  4. repeat the process

I got 1), but can´t imagine how to wait, i was thinking on scheduleOnce, but that will pause only once, so i think i can use a for/while kind loop or recursive… is there any other builtin alternative?

Thanks in advance…

You should really read our docs…

https://docs.cocos2d-x.org/cocos2d-x/v3/en/actions/sequences.html

1 Like

I´m so sorry to be that lazy… thanks.

We try to document the most basic things developers will need. Hopefully… :slight_smile:

I really appreciate that!.. thanks so much… :grinning:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.