The run of CCApplication is the main loop. It is responsible for calling the mainloop of CCDirector while idle, and setting the second frame of setAnimationInterval. M_nAnimationInterval records the number of cpu cycle triggering cycles in the past.
The stopAnimation function of CCDirector stops all painting and Action events, and does not call drawScene during the stop process.
The pause function will stop the action event and lower the Frame Rate of the CCApplication, with four frames per second.
Action events call the update loop of m_pschedd in the drawScene function. m_bPaused is true during the pause process and will not be called.
The painting process traverses the subnode of the main scene. If zorder is a negative number, draw the subnode first, and finally draw the subnode whose zorder is greater than or equal to 0. The larger the zorder, the higher the upper layer.