UNITY3D-RPG Project Study notes (16)

Source: Internet
Author: User

The last-time feature implements the click Logic of the NPC model, and now begins to create a list of medicines for the information window.

Functional Requirements:

① displays a list of information about the drug, including: icon of the item, item name, item effect, item price;

② Displays the purchase button of the medicine, realizes the click function;

③ Click the Buy button, display the input box, enter a number in the box after the OK Confirmation button.

The build process is as follows:

① Create a Sprite, defined as a store background;

② Create a Sprite, defined as a drug information line;

③ Create a drug icon in the drug information line, create three labels, and then enter the name, effect, and price into the label.

④ after the drug information line added buy button, add button function;

⑤ Copies 2 copies of the above-mentioned drug information lines, and makes three label information respectively.

⑥ Create a Sprite in the store context and add a label to it, add Simpleinputfield to it, assign the label to Simpleinputfield, The variable validation in Simpleinputfield is defined as an integer, which guarantees that the user enters the value as a number.

UNITY3D-RPG Project Study notes (16)

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.