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)