Unity3d game development experience of merchant module development, unity3d Game Development

Source: Internet
Author: User

Unity3d game development experience of merchant module development, unity3d Game Development
Figure 0

Okay, let's get started ~

Figure 1

Here, I still want to confirm the name of kimchi kids shoes. In Figure 1, this part is set when I just took over, and the structure is as follows:
● UI_Shop: parent object of the entire store
● Shop_bg: the store's brown background
● Shop_title_bg: the banner store contains two characters, including the banner itself.
● Shop_head: siina's shop girl Profile
● Shop_refresh_Button: refresh button
● Backbt: Return button
● Shop_product_bg_00: item No. 00
● Shop_product_bg_01: Same as above
● Shop_product_bg_02: Same as above
● Shop_product_bg_03: Same as above
● Shop_product_bg_04: Same as above
● Shop_product_bg_05: Same as above

That's right. If you don't believe it, let's analyze the art materials needed for the products in the store.
Product art materials include:
Quality External Frame (e.g ,)
Variety icons (such as, and) [slightly larger workload]

Classification icons (e.g ,)
Cost icon (e.g ,)

I spent money on collecting these materials ~ This is only the first step,
Next, when the materials are sufficient, we start to build presets.

Ah, if Declan is not mistaken, you must be careful with the following:
The icon of an item is basically like this ---->, with four sides.
For example, the quality frame of "fragments" or "soul Stone" is similar to the sauce purple ---->, and a pair of corners are cropped.




"What should I do if the two images overlap beyond the outer frame ?" For example
"What should I do if I only scale down the item icon, even if it does not exceed the outer frame, but the whole UI looks hollow out ?" For example

If the audience in front of the TV... uh, no... this is a similar problem for beginners in front of the screen. Don't worry or be afraid. It's just because our new users lack the concept of Mask because of their lack of experience and experience.



Figure 2





So how can we implement the so-called Mask in unity?


Figure 3
You need to create a material ball, select the Shader script written for the shadow, and drag the hero icon to the Base item, drag the fragment Mask icon with Alpha channel to the Culling Mask. The Code is as follows:
Copy code
The display effect is shown in Figure 4.



Okay, Shader is not the focus of this Article. After a simple explanation, we will start to get down to the truth. Source of the article [DOG planing learning network]
In fact, the new UI System of Unity-UGUI has provided us with similar components.
Figure 5
Usage: directly add this component to the icon with Alpha channel that you need to implement the mask.
Then, after learning about the concept of the Mask and the usage of the Mask component, let's take a look at the hierarchical relationship structure preset for a single product to make it clearer. 6

Figure 6
As shown in, the pre-defined hierarchical relationship is: ● shop_product_bg: the parent object of a single item preset. ● Goods: A parent object preset for a specific item ● full: a complete item, such as a bachelor or experience potion ● chip: is a fragment such as a flute scroll fragment or an incomplete item of the soul stone ● chip_mask: in addition to the image component, the Mask component is added ● cardIcon: is a specific item icon ● kind: is an icon such as fragment (yellow) or soul stone (purple) ● count: The specific quantity of this item ● Title: Product Name ● Cost: specific value used to purchase the product ● Image: Cost type (such as gold coins, diamond, etc.) ● SoldOutImage: sold-out icon displayed after purchase

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.