Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm teaching myself andengine while trying to make a match-3 puzzle, so far I have a grid of gems that I populate and can move then around. Matching gems and new gems falling is working already. My problem is that the game keeps flowing while animations runs. How can I make the flow suspend until movement is done?

I use entity modifiers for the gems animations. MoveYModifier for the fall and PathModifier for the swap.

share|improve this question
up vote 3 down vote accepted

You could override the entity modifier and execute some code at the beginning of the modification and on its end

MoveYModifier yourModifier = new MoveYModifier(3, 0, 10)
        protected void onModifierStarted(IEntity pItem)
                // Your action after starting modifier

        protected void onModifierFinished(IEntity pItem)
                // Your action after finishing modifier

share|improve this answer
That's exactly what I did, you are kinda late =P. I even forgot about this question. Nonetheless, your anwser is correct, thanks for posting. – petervaz Nov 26 '12 at 21:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.