1. during the creation of the response button event, if the response event of the button is to open a page, that is, to create a new page, delete the same page that was previously created, in this way, you can avoid a gamer's mad click. If the button drop function is to request a server point, some callback operations may be performed after the request. There are two ways to design the user experience: 1, force the disable operation interface until the callback is completed before unblocking. 2. Pretend to block the operation and set the flag to determine whether the callback is complete. If the callback is not completed, when a player clicks a button, no new request is generated. In contrast, the second method seems to be more user-friendly. After all, it hides a soft shield that gives users a more harmonious sense of rejection. Of course, in some cases, the page is deleted because the callback is not completed, but the callback is placed in the main thread to perform operations on the UI. Therefore, if you do not make a protection judgment, it will collapse when network latency occurs. Therefore, you need to check whether the objects of these operations still exist in the callback.
Cocos2dx development and growth path 001