A Layer is used to present a specific object in a centralized manner. Generally, several layers are added to Scene to manage an activity. At this time, the layer carries the meaning of a container, and what should be drawn in this layer. The container also has other elements such as node, so here layer is an important role, the coordinate system. The coordinate system is global. Therefore, this key point is the basis for manipulating collision detection between multiple layers. When designing a game, you need to figure out which genie are drawn in which layer. Therefore, the layer is added to scene and will be used in many later logics. Therefore, there must be a method in scene to obtain this layer.1. It is very convenient to obtain scene through static methods. But note that scene requires a static variable to save and release it. 2. Think of scene as a context. All related parties need this context. This is in line with the design philosophy of the vast majority of UI frameworks. The context must be passed when the code is more complex.