Touch Overlay

pat1pat1 CHMember
edited August 2017 in CocosSharp


I'm working on a card game and the card's the user holds are next to each other with an overlay. Now when the user selects a card I'm detecting with a touchevent if a card matched the position of the touch. If yes, I know which card he wants to play. This works great, my problem now is that because of the overlay sometimes two cards get selected. Is there a way to detect if the location of the CCSprite is visible or what is the correct approach for this problem?

thank you


  • MrTcMrTc PKMember ✭✭

    i don't get your problem clearly but you can use ccsprite Tag and Differentiate each Cards separately

        CCSprite aa = new CCsprite("file");
        aa.Tag=1; // you can select what ever you want 

    hope it will solve your problem

Sign In or Register to comment.