Cocos2dx development and growth path 001

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.