Unity3d object-oriented design ideas (IV) (game backpack processing I)

Source: Internet
Author: User

 

In Unity3d, I personally think the best solution is to connect with objects. For example, click a button to display a 2D UI, and then

Read item-Related Information Based on Data configuration. Using NGUI to implement a backpack, you can also use NGUI to distribute events to the system, and use NGUITools to send broadcasts to the Root section.

Point: add the entry to a UIScrollView. The advantage is that the backpack can be displayed on the screen to facilitate UI creation. In addition, the backpack is a type

Features frequently used in games are stored in the memory on the main interface.

 

 

A. Write a class to indicate the unique expression of the current backpack Lattice

Public void policybagitem () {if (! String. IsNullOrEmpty (item1) NGUITools. Broadcast ("OnBagItemClick", item1 );}


B. The purpose of the marker is to click the check box to determine whether there are items in the current check box.

 

Using this idea to write a backpack, the disadvantage is that the backpack lattice must be limited, and the logic of the backpack lattice has not been determined yet.

There is no good solution for tomorrow's holiday, but I want to use NGUI to implement it.

 

:)

Related Article

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.