示例#1
0
    void Start()
    {
        invObject = GetComponent <InventoryObj>();
        invObject.changeID(ID);

        Debug.Log(invObject.ReturnName());
        Debug.Log(invObject.ReturnDescription());
    }
示例#2
0
    public void changeID(int newID)
    {
        objID = newID;

        InventoryObj obj = getObj(newID);

        objName     = obj.ReturnName();
        description = obj.ReturnDescription();
    }