Show / Hide Table of Contents

Class vGear_Inventory

The inventory menu of inventory system.
庫存系統中的庫存選單。

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
vGear_Inventory
Namespace: Votanic.vXR.vGear
Assembly: Votanic.vXR.dll
Syntax
[AddComponentMenu("")]
public class vGear_Inventory : MonoBehaviour

Fields

categories

Categories of this inventory.
庫存的範疇。

Declaration
[Tooltip("Categories of this inventory.\n庫存的範疇。")]
public List<InventoryCategory> categories
Field Value
Type Description
System.Collections.Generic.List<InventoryCategory>

categoryReference

Reference of category transform, the first category.
範疇 Transform 參考,第一個範疇。

Declaration
[Tooltip("Reference of category transform, the first category.\n範疇 Transform 參考,第一個範疇。")]
public Transform categoryReference
Field Value
Type Description
UnityEngine.Transform

checkCurrency

Check inventory currency or not.
是否檢查庫存貨幣。

Declaration
[Tooltip("Default open inventory or not.\n是否檢查庫存貨幣。")]
public bool checkCurrency
Field Value
Type Description
System.Boolean

containerReference

Reference of item container, the first container position.
物品容器參考,第一件容器的位置。

Declaration
[Tooltip("Reference of item container, the first container position.\n物品容器參考,第一件容器的位置。")]
public GameObject containerReference
Field Value
Type Description
UnityEngine.GameObject

currencies

Currencies amount in this inventory.
這個庫存擁有的貨幣金額。

Declaration
[Tooltip("Currencies amount in this inventory.\n這個庫存擁有的貨幣金額。")]
public List<CurrencyAmount> currencies
Field Value
Type Description
System.Collections.Generic.List<CurrencyAmount>

currentCategory

Current selected category.
目前點選的範疇。

Declaration
[Header("[Status]")]
[Tooltip("Current selected category.\n目前點選的範疇。")]
public int currentCategory
Field Value
Type Description
System.Int32

currentPage

Current page of category.
目前範疇的頁面。

Declaration
[Tooltip("Current page of category.\n目前範疇的頁面。")]
public int currentPage
Field Value
Type Description
System.Int32

defaultOpen

Default open inventory or not.
預設是否打開庫存。

Declaration
[Tooltip("Default open inventory or not.\n預設是否打開庫存。")]
public bool defaultOpen
Field Value
Type Description
System.Boolean

gridGap

Grid size for storing 1x1 size item.
放置 1x1 大小的物品的方格大小。

Declaration
[Tooltip("Grid size for storing 1x1 size item.\n放置 1x1 大小的物品的方格大小。")]
public Vector2 gridGap
Field Value
Type Description
UnityEngine.Vector2

gridSize

Grid size for storing 1x1 size item.
放置 1x1 大小的物品的方格大小。

Declaration
[Tooltip("Grid size for storing 1x1 size item.\n放置 1x1 大小的物品的方格大小。")]
public Vector2 gridSize
Field Value
Type Description
UnityEngine.Vector2

gridStyle

The grid style index to store items. If the item does not have this grid style, it will use the first one.
存放物品的方格格式編號。當物品沒有這個格式時將會使用第一種格式。

Declaration
[Header("[Settings]")]
[Tooltip("The grid style index to store items. If the item does not have this grid style, it will use the first one.\n存放物品的方格格式編號。當物品沒有這個格式時將會使用第一種格式。")]
public int gridStyle
Field Value
Type Description
System.Int32

holdingAngle

Angle for the holding item container on controller.
持有物品容器時的容器在控制器的角度。

Declaration
[Tooltip("Angle for the holding item container on controller.\n持有物品容器時的容器在控制器的角度。")]
public Vector3 holdingAngle
Field Value
Type Description
UnityEngine.Vector3

holdingOffset

Offset for the holding item container on controller.
持有物品容器時的容器在控制器的位置。

Declaration
[Tooltip("Offset for the holding item container on controller.\n持有物品容器時的容器在控制器的位置。")]
public Vector3 holdingOffset
Field Value
Type Description
UnityEngine.Vector3

isOpened

Return true if the inventory is opened.
當庫存打開時傳回 true。

Declaration
[Tooltip("Return true if the inventory is opened.\n當庫存打開時傳回 true。")]
public bool isOpened
Field Value
Type Description
System.Boolean

mainPanel

Main panel of inventory.
庫存主面板。

Declaration
[Header("[Components]")]
[Tooltip("Main panel of inventory.\n庫存主面板。")]
public vGear_Panel mainPanel
Field Value
Type Description
vGear_Panel

pageChangers

Page changer buttons of inventory.
庫存的跳頁按鈕。

Declaration
[Tooltip("Page changer buttons of inventory.\n庫存的跳頁按鈕。")]
public List<vGear_Button> pageChangers
Field Value
Type Description
System.Collections.Generic.List<vGear_Button>

pageReference

Reference of category page object, the first page.
範疇頁面物件參考,第一個頁面。

Declaration
[Tooltip("Reference of category page object, the first page.\n範疇頁面物件參考,第一個頁面。")]
public GameObject pageReference
Field Value
Type Description
UnityEngine.GameObject

Methods

Back()

Open the previous page.
打開上一頁。

Declaration
public void Back()

CanPlace(vGear_ItemContainer, InventoryCategory[])

Reutrn the item container if the item can be placed to inventory.
當物品可放在庫存時傳回物品容器。

CanPlace(itemContainer)

Declaration
public vGear_ItemContainer CanPlace(vGear_ItemContainer other, params InventoryCategory[] categories)
Parameters
Type Name Description
vGear_ItemContainer other

Other container
其他容器

InventoryCategory[] categories

Specific categories
指定的範疇

Returns
Type Description
vGear_ItemContainer

Close()

Close inventory.
關閉庫存。

Declaration
public void Close()

Next()

Open the next page.
打開下一頁。

Declaration
public void Next()

Open(Int32)

Open inventory. 打開庫存。

Open()

Declaration
public void Open(int category = 0)
Parameters
Type Name Description
System.Int32 category

Category index
範疇編號

Open(Int32, Int32)

Open inventory. 打開庫存。

Open(0, 0)

Declaration
public void Open(int category, int page)
Parameters
Type Name Description
System.Int32 category

Category index
範疇編號

System.Int32 page

Page in category
範疇頁面

Page(Int32)

Open inventory. 打開庫存。

Page(0)

Declaration
public void Page(int page = 0)
Parameters
Type Name Description
System.Int32 page

Page in category
範疇頁面

SetAvailables(Int32, Int32, Int32)

Enable more grid for a page of category in the inventory.
啟用更多庫存範疇中頁面的方格。

SetAvailables(0, 0, 15)

Declaration
public void SetAvailables(int category, int page, int grids)
Parameters
Type Name Description
System.Int32 category

Category index
範疇編號

System.Int32 page

Page index
頁面編號

System.Int32 grids

Number of available grids
可用方格數目

SetParent(Transform)

Set a parent for the inventory.
為庫存設定一個母物件。

SetParent(transform)

Declaration
public void SetParent(Transform parent)
Parameters
Type Name Description
UnityEngine.Transform parent

Target transform
目標 Transform

SetParent(Transform, Vector3, Vector3)

Set a parent for the inventory.
為庫存設定一個母物件。

SetParent(transform, Vector3.zero, Vector3.zero)

Declaration
public void SetParent(Transform parent, Vector3 position, Vector3 eulerAngles)
Parameters
Type Name Description
UnityEngine.Transform parent

Target transform
目標 Transform

UnityEngine.Vector3 position

Relative position
相對位置

UnityEngine.Vector3 eulerAngles

Relative euler angles
相對角度

StoreCurrencies(List<CurrencyAmount>, vGear_Inventory)

Store currencies from other inventory to this inventory.
將其他庫存的貨幣轉存至這個庫存。

StoreCurrencies(main, safe)

Declaration
public void StoreCurrencies(List<CurrencyAmount> amount, vGear_Inventory from)
Parameters
Type Name Description
System.Collections.Generic.List<CurrencyAmount> amount

Curriencies value
貨幣價值

vGear_Inventory from

Other inventory
其他庫存

In This Article
Back to top Generated by DocFX