Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17093

How to detect which sprite touched , when i don't know where in the hierarchy it is

$
0
0

@umen242 wrote:

Hello all
i have scene which holds layer and there are sprites which are generated dynamically in hierarchy .

Layer -
---------s1
----------|-----------s2
----------|-----------s3
---------s4
----------|-----------s5
----------------------|-----------s6

i have layer which is the parent and only s6 is visible .
but it is child of s5 which is child of s4 which is child of the layer .
now i like it when i touch the visible sprite (s6) to get the node reference .
again this is dynamic. to i have only the parent (layer ) constant every time .
what is the best way to implement it ?
Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17093


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>