-1
\$\begingroup\$

how to remove SceneTouchListner at a specific point?

I am Working on a Endless Runner Game. my player is jumping onSceneTouchListner when player is collide with a barrier i want to remove TouchListner because i attached a particle effact that burns my player.

\$\endgroup\$
-1
\$\begingroup\$

finally I got Solution ..............I am Creating a new IOnSceneTouchListener tv= new IOnSceneTouchListener() {

                @Override
                public boolean onSceneTouchEvent(Scene pScene, TouchEvent pSceneTouchEvent) 
                {
                    if(pSceneTouchEvent.isActionUp())
                    {
                        player.animate(new long[]{200, 200, 200},9,11, true);   
                        return true;
                    }
                    return false;
                }
            };

and the just write scene.setonsceneTouchListner(tv);.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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