I have a set of sprite lists.i want to remove the topmost lying sprite if the sprites overlap.
if ( popRect1.containsPoint( popRect1, location ) ) {
BaloonList1.remove( baloons );
baloons.removeSelf();
}
if ( popRect2.containsPoint( popRect2, location ) ) {
BaloonList2.remove( baloons );
baloons.removeSelf();
}
When two sprites of same list overlap and if i touch them only the topmost sprite will be removed...if 2 sprites are from different list and when i touch the topmost sprite both of them are removing(Like my touch is intercepting..I think its happening because both the touch points are with the bounded rectangles of the sprites)..I searched alot.Some say override TouchBegan..registerWithTouchDispatcher...DOes any one have any idea ??????? i know this could be a easy question 4u guys.Please let me know if u want more code or description regarding this