I'm sure this is simple and has been answered before but I can't find an answer.
I have two objects in the same place which switch screens (layers). When one is clicked, it switches to screen A, when the other is clicked, I switch to screen B. But they're both in the same place. Problem is, both are being clicked at the same time so only one works (i.e both get processed).
I'm checking the layer of the object, which I normally use in these situations but it's not working.
E.G
If mouse clicks on sprite A.
SpriteA.LayerName is visible .... Switch to Screen B
If mouse click on sprite B
SpriteB.LayerName is visible .... Switch to Screen A.
I would have thought checking the layername would fix this but it's not working.