Scene is a Layer

You’re definitely watching to much HBO :wink:

I think I will put it on github during this summer, but currently I have an exam in the middle of the month of July… So…
Slackoehrle I will think about it :joy_cat:

That’s great! Thanks!

1 Like

Back to the question, please.
I’m new to Cocos2dx too, and i really don’t understand what’s different between Layer and Scene.

I see in the example project, there’s a HelloWorldScene but its a class extending Layer.
class HelloWorld : public cocos2d::Layer

Why itsn’t extend Scene?

This is really a poor way for us to demonstrate these concepts to you. It is legacy.
You really don’t even need to use Layer anymore.

You are a Director of a movie. You are shooting a Scene at a coffee shop. Everything going on in the Scene is part of the Scene. If there are things in the Scene (Layer, Sprite, Action, Sequence), they are part of the Scene.

In the examples the MainScene extends from Node and the Chapters extend from Ref. Would you mind a brief explanation about this please?

Node because then your class inherits properties that Nodes have. Ref is just a base class