I call setVisible(false) on a parent sprite and then call "isVisible()" on the objects children but the children returns true. The child objects disappear just as expected but any calls to their isVisible() method returns true. any ideas?
I think this is the what we [ atleast me ] are expecting when parent is invisible make all its children also invisible and when again we make it visible all the children must have visibility which was set previously means if 5 are visible and 3 are invisible then they must have to come in same way.
all you need to do is find a way to get visibility of parent sprite
Well it seems like there should be a "visibleOnScreen()" call then as checking the parent in many situations checking the parent multiple levels would create a huge amount of coupling that would be thrown off if moved to another sprite.
Have you checked out @ar2rsawseen 's GiderosCodingEasy library. It includes many enhancements that people have thought should really be part of the base SDK. One of them is a method, Sprite:isVisibleDeeply(), which does what you want, I think.
Comments
all you need to do is find a way to get visibility of parent sprite
Thanks! i will check it out. Seems so handy it should be in the SDK proper
Best regards
Likes: hgvyas123