|
void | OnBeginDrag (PointerEventData eventData) |
| Begin executing when we start to dran an item from the inventory bar More...
|
|
void | OnDrag (PointerEventData eventData) |
| Move gameobject as dragged item. More...
|
|
void | OnEndDrag (PointerEventData eventData) |
| If item is droppable, drop the item otherwise destroy it. More...
|
|
void | OnPointerClick (PointerEventData eventData) |
| If we click an item in the inventory set it or clear it another is already selected. More...
|
|
void | OnPointerEnter (PointerEventData eventData) |
| Populate TextBox with item details. More...
|
|
void | OnPointerExit (PointerEventData eventData) |
| Call the function to destroy the gameobject. Once we hover away from the inventory slot, we don't need to see the item description anymore. More...
|
|
void | DestroyInventoryTextBox () |
| Destroy gameobject when we hover away from the inventory slot. More...
|
|
void | SceneLoaded () |
| When we add a new scene, we lost the previous game object and therefore need to find it again. Otherwise, we can't throw items from inventory to ground. More...
|
|
Definition at line 6 of file UIInventorySlot.cs.
◆ Awake()
void UIInventorySlot.Awake |
( |
| ) |
|
|
inlineprivate |
Get called when the script is loaded. Initialize the parent canvas.
Definition at line 43 of file UIInventorySlot.cs.
◆ ClearCursors()
void UIInventorySlot.ClearCursors |
( |
| ) |
|
|
inlineprivate |
◆ ClearSelectedItem()
void UIInventorySlot.ClearSelectedItem |
( |
| ) |
|
|
inlineprivate |
◆ DestroyInventoryTextBox()
void UIInventorySlot.DestroyInventoryTextBox |
( |
| ) |
|
|
inline |
Destroy gameobject when we hover away from the inventory slot.
Definition at line 322 of file UIInventorySlot.cs.
◆ DropSelectedItemAtMousePosition()
void UIInventorySlot.DropSelectedItemAtMousePosition |
( |
| ) |
|
|
inlineprivate |
Drop the item (if selected) at the current mouse position. Called by drop item event
Definition at line 153 of file UIInventorySlot.cs.
◆ OnBeginDrag()
void UIInventorySlot.OnBeginDrag |
( |
PointerEventData |
eventData | ) |
|
|
inline |
Begin executing when we start to dran an item from the inventory bar
- Parameters
-
Definition at line 183 of file UIInventorySlot.cs.
◆ OnDisable()
void UIInventorySlot.OnDisable |
( |
| ) |
|
|
inlineprivate |
◆ OnDrag()
void UIInventorySlot.OnDrag |
( |
PointerEventData |
eventData | ) |
|
|
inline |
◆ OnEnable()
void UIInventorySlot.OnEnable |
( |
| ) |
|
|
inlineprivate |
◆ OnEndDrag()
void UIInventorySlot.OnEndDrag |
( |
PointerEventData |
eventData | ) |
|
|
inline |
If item is droppable, drop the item otherwise destroy it.
- Parameters
-
Definition at line 217 of file UIInventorySlot.cs.
◆ OnPointerClick()
void UIInventorySlot.OnPointerClick |
( |
PointerEventData |
eventData | ) |
|
|
inline |
If we click an item in the inventory set it or clear it another is already selected.
- Parameters
-
Definition at line 255 of file UIInventorySlot.cs.
◆ OnPointerEnter()
void UIInventorySlot.OnPointerEnter |
( |
PointerEventData |
eventData | ) |
|
|
inline |
◆ OnPointerExit()
void UIInventorySlot.OnPointerExit |
( |
PointerEventData |
eventData | ) |
|
|
inline |
Call the function to destroy the gameobject. Once we hover away from the inventory slot, we don't need to see the item description anymore.
- Parameters
-
Definition at line 314 of file UIInventorySlot.cs.
◆ SceneLoaded()
void UIInventorySlot.SceneLoaded |
( |
| ) |
|
|
inline |
When we add a new scene, we lost the previous game object and therefore need to find it again. Otherwise, we can't throw items from inventory to ground.
Definition at line 334 of file UIInventorySlot.cs.
◆ SetSelectedItem()
void UIInventorySlot.SetSelectedItem |
( |
| ) |
|
|
inlineprivate |
◆ Start()
void UIInventorySlot.Start |
( |
| ) |
|
|
inlineprivate |
◆ m_DraggedItem
GameObject UIInventorySlot.m_DraggedItem |
|
private |
◆ m_GridCursor
◆ m_InventoryBar
◆ m_InventorySlotHighlight
Image UIInventorySlot.m_InventorySlotHighlight |
◆ m_InventorySlotImage
Image UIInventorySlot.m_InventorySlotImage |
◆ m_InventoryTextBoxPrefab
GameObject UIInventorySlot.m_InventoryTextBoxPrefab = null |
|
private |
◆ m_IsSelected
bool UIInventorySlot.m_IsSelected = false |
◆ m_ItemDetails
◆ m_ItemPrefab
GameObject UIInventorySlot.m_ItemPrefab = null |
|
private |
◆ m_ItemQuantity
int UIInventorySlot.m_ItemQuantity |
◆ m_MainCamera
Camera UIInventorySlot.m_MainCamera |
|
private |
◆ m_ParentCanvas
Canvas UIInventorySlot.m_ParentCanvas |
|
private |
◆ m_ParentItem
Transform UIInventorySlot.m_ParentItem |
|
private |
◆ m_SlotNumber
int UIInventorySlot.m_SlotNumber = 0 |
|
private |
◆ m_TextMeshProUGUI
TextMeshProUGUI UIInventorySlot.m_TextMeshProUGUI |
The documentation for this class was generated from the following file: