Best Practice and Pushing Stuff Around

Forums Programming Programming – Everything else Best Practice and Pushing Stuff Around

This topic contains 0 replies, has 1 voice, and was last updated by  clops 2 years, 2 months ago.

Viewing 1 post (of 1 total)
Author Posts
Author Posts
February 9, 2012 at 3:18 pm #239083



I am at the start of my cocos2d adventure, and have some ideological questions to ask. I am making a small space-shooter game, am I right to use the following class structure?

- Scene

– Background Layer

— Infinite parallax background

– Game Layer

— Space ships and bullets

– Control Layer

— Joystick & buttons

and a followup question — what is the best practice in accessing objects from other layers? For example, when the joystick is updated, it must rotate the space ship and move the background. Both of these are in other layers. Is there some recommended way to go about this or should I simply get the desired objects by Tag and operate on them?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.