|
Eye of the Nile Docs
Everything you need to know to get started!
|
Handles the display and functionality of the ability inventory UI, accessed in the Skyhub.
Documentation updated 9/19/2024
Public Member Functions | |
| void | OpenInventory () |
| Disables the main canvas and enables the inventory panel, then runs InitializeSlots(). | |
| void | ExitInventory () |
| Updates Scriptables_ActiveAbilties, then enables the main canvas and disables the inventory panel. | |
| void | OpenInventoryAnimation () |
| void | OpenDetailsPanel (AbilityInventorySlot inventorySlot) |
| Opens the more details view under the given ability slot. | |
| void | ExitDetailsPanel () |
| Closes the more details view. | |
| void | InitializeSlots () |
| Fills out the AbilityInventoryItemData for each slot. | |
| void | UpdateActiveAbilities () |
| Update Scriptables_ActiveAbilties to reflect any changes made in the ability inventory. | |
Events | |
| static Action | abilityInventoryOpened |
| Invoked when the ability inventory is opened. | |
| static Action | abilityInventoryClosed |
| Invoked when the ability inventory is closed. | |
| static Action | abilityInventorySlotInitialized |
| Invoked when the slots in the ability inventory have been initialized. | |
Private Member Functions | |
| void | Awake () |
| Run InitializeSlots(). | |
| void | Update () |
| Runs every frame. Checks if the user has pressed escape or E. If so, closes the menu(s). | |
Private Attributes | |
| ActiveAbilityData | activeAbilityData |
| Reference to Scriptables_ActiveAbilties. | |
| AbilityInventory | abilityInventory |
| Reference to Scriptables_AbilityInventory. | |
| GameObject | inventoryPanel |
| Reference to the background panel of the ability inventory UI, which holds all the UI elements. | |
| GameObject | mainCanvas |
| Reference to Canvas.prefab. This will be disabled while the ability inventory is open. | |
| GameObject | detailsPanel |
| Reference to the details panel of the ability inventory UI, which holds the UI elements for the more details display. | |
| ScrollAnimationManager | scrollAnimationManager |
| Reference to the scroll animation manager, which handles the animations of the scroll background. | |
| ConfirmationPanel | confirmationPanel |
| Reference to confirmation panel that is shown when an ability is about to be upgraded. | |
| Image[] | abilityIcons |
| List of icons for the ability items. | |
| AbilityInventoryItemData[] | iconData |
| List of data for the ability items. | |
| AbilityInventorySlot[] | abilityInventorySlots |
| List of slots at the top holding unused abilities. | |
| AbilityInventorySlot[] | activeAbilitySlots |
| List of slots at the bottom holding the currently used abilities. | |
| EmptyAbilityInfo | emptyAbilityInfo |
| Reference to Scriptables_EmptyAbilityInfo. | |
| bool | inventoryOpen = false |
| True if the ability inventory is currently open. | |
| bool | detailsOpen = false |
| True if the ability details panel is currently open. | |
|
private |
Run InitializeSlots().
| void AbilityInventoryUI.ExitDetailsPanel | ( | ) |
Closes the more details view.
| void AbilityInventoryUI.ExitInventory | ( | ) |
Updates Scriptables_ActiveAbilties, then enables the main canvas and disables the inventory panel.
| void AbilityInventoryUI.InitializeSlots | ( | ) |
Fills out the AbilityInventoryItemData for each slot.
| void AbilityInventoryUI.OpenDetailsPanel | ( | AbilityInventorySlot | inventorySlot | ) |
Opens the more details view under the given ability slot.
| void AbilityInventoryUI.OpenInventory | ( | ) |
Disables the main canvas and enables the inventory panel, then runs InitializeSlots().
| void AbilityInventoryUI.OpenInventoryAnimation | ( | ) |
|
private |
Runs every frame. Checks if the user has pressed escape or E. If so, closes the menu(s).
| void AbilityInventoryUI.UpdateActiveAbilities | ( | ) |
Update Scriptables_ActiveAbilties to reflect any changes made in the ability inventory.
|
private |
List of icons for the ability items.
|
private |
Reference to Scriptables_AbilityInventory.
|
private |
List of slots at the top holding unused abilities.
|
private |
Reference to Scriptables_ActiveAbilties.
|
private |
List of slots at the bottom holding the currently used abilities.
|
private |
Reference to confirmation panel that is shown when an ability is about to be upgraded.
|
private |
True if the ability details panel is currently open.
|
private |
Reference to the details panel of the ability inventory UI, which holds the UI elements for the more details display.
|
private |
Reference to Scriptables_EmptyAbilityInfo.
|
private |
List of data for the ability items.
|
private |
True if the ability inventory is currently open.
|
private |
Reference to the background panel of the ability inventory UI, which holds all the UI elements.
|
private |
Reference to Canvas.prefab. This will be disabled while the ability inventory is open.
|
private |
Reference to the scroll animation manager, which handles the animations of the scroll background.
|
static |
Invoked when the ability inventory is closed.
|
static |
Invoked when the ability inventory is opened.
|
static |
Invoked when the slots in the ability inventory have been initialized.