Hi
I have some trouble with a basic concept. I have my cocos2d stuff working as I want but the problem is in my application logic.
I have a Layer with several AtlasSprites (Object inherited from AtlasSprite). The user can touch on the AtlasSprite, and now my problem, how can I access information from the layer ? The AtlasSprite needs to know if it is allowed. The touch action is within the AtlasSprite Object, but the Object does only know itself not its word, that information is stored in the Layer.
Would I pass a pointer of my Layer into AtlasSprites Object or make a Singleton out of my Layer ? Sorry I am kinda lost here how to do this.
Hope someone can help me out here.
thx