Unity Backpack System (Ugui) Implementation method

Source: Internet
Author: User

    1. Backpack Management
    2. Lattice management
    3. Item Management
    4. Item Information Management
a simple backpack function, should be divided into 3 parts, namely Backpack management , lattice , items .   class Inventory -This category is mainly used to manage the entire backpack, including the sorting of items, picking, discarding, and other functions class Inventory_grid -This class is primarily used to store information about the lattice, such as the ID of the item being placed, whether there is an item class Inventory_item -This category is primarily a drag-and-drop feature, and it holds information about the item class Objectsinfo -Information that holds the item, (information about the item stored in XML)The next step is to implement the basic functions of Ugui, such as drag and drop, and then Inventory_item the class to inherit 5 interfaces.Note:using Unityengine.eventsystem;
    1. Ibeingdraghandler (Onbeingdrag)
    2. Idraghandler (Ondrag)
    3. Ienddraghandler (EndDrag)
    4. Ipointerhandler (Onpointerenter)
    5. Ipointerexithandler (Onpointerexit)
             The source code is then saved.
  



From for notes (Wiz)



List of attachments

Unity Backpack System (Ugui) Implementation method

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.