Hello! I am completely new to Phaser 3 and I am developing a simple Whac-a-Mole style game where targets will popup on the screen from behind background layers and on mouse-click, will gain points.
I am having trouble figuring out the tween timeline. I am able to load the target images, add a data attribute to them (some targets add points, others subtract points), and set up a pointer click event for each.
I have set up a tween timeline for each of these targets but I don’t know how to make all of them loop in succession. Right now, they are each looping on their own.
Meaning, if I had 4 targets, the sequence should go:
Target 1 shows, then target 2, then 3, then 4, then loops back to 1.
Right now, it is doing something more like:
Target 1 goes, then repeats on its own timing. Target 2 goes based off the delay value I set and loops on its own. Target 3 and 4, the same thing.
I’m not sure how to make all of the targets wait until all of them have gone before restarting the loop…
Other than that, the game is working as expected!