-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-instance API discussion #1375
Labels
Comments
Stack of directors is a super bad idea, since we end up with global state again. scene.director is much much better. But look at SpriteKit, it hasn't SKDirector, all its functionality is moved to SKView. So should we have both CCDirector and CCView? Maybe they should be merged? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We already have an implementation of multiple CCDirector instances in
develop
branch. There is stack type of situation.While it seems to be a clever solution it might be confusing a little bit for newcomers that only want to have single Cocos2D instance to see something like
CCDirector pushDirector
CCDirector popDirector
That is why I guess we should discuss if there any other way to find a solution or at least syntax sugar for accessing the director.
I have a little bit of a thought on that. Right now every node having a reference to it's scene. Why not add director reference to the scene, so it can be accessed by:
node.scene.director
I think it can be useful sometimes, but that is of course debatable.
The text was updated successfully, but these errors were encountered: