Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
AbilityInventoryUI Class Reference

Detailed Description

Handles the display and functionality of the ability inventory UI, accessed in the Skyhub.

Documentation updated 9/19/2024

Author
Stephen Nuttall

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.
 

Member Function Documentation

◆ Awake()

void AbilityInventoryUI.Awake ( )
private

◆ ExitDetailsPanel()

void AbilityInventoryUI.ExitDetailsPanel ( )

Closes the more details view.

◆ ExitInventory()

void AbilityInventoryUI.ExitInventory ( )

Updates Scriptables_ActiveAbilties, then enables the main canvas and disables the inventory panel.

◆ InitializeSlots()

void AbilityInventoryUI.InitializeSlots ( )

Fills out the AbilityInventoryItemData for each slot.

◆ OpenDetailsPanel()

void AbilityInventoryUI.OpenDetailsPanel ( AbilityInventorySlot inventorySlot)

Opens the more details view under the given ability slot.

◆ OpenInventory()

void AbilityInventoryUI.OpenInventory ( )

Disables the main canvas and enables the inventory panel, then runs InitializeSlots().

◆ OpenInventoryAnimation()

void AbilityInventoryUI.OpenInventoryAnimation ( )

◆ Update()

void AbilityInventoryUI.Update ( )
private

Runs every frame. Checks if the user has pressed escape or E. If so, closes the menu(s).

◆ UpdateActiveAbilities()

void AbilityInventoryUI.UpdateActiveAbilities ( )

Update Scriptables_ActiveAbilties to reflect any changes made in the ability inventory.

Member Data Documentation

◆ abilityIcons

Image [] AbilityInventoryUI.abilityIcons
private

List of icons for the ability items.

◆ abilityInventory

AbilityInventory AbilityInventoryUI.abilityInventory
private

Reference to Scriptables_AbilityInventory.

◆ abilityInventorySlots

AbilityInventorySlot [] AbilityInventoryUI.abilityInventorySlots
private

List of slots at the top holding unused abilities.

◆ activeAbilityData

ActiveAbilityData AbilityInventoryUI.activeAbilityData
private

Reference to Scriptables_ActiveAbilties.

◆ activeAbilitySlots

AbilityInventorySlot [] AbilityInventoryUI.activeAbilitySlots
private

List of slots at the bottom holding the currently used abilities.

◆ confirmationPanel

ConfirmationPanel AbilityInventoryUI.confirmationPanel
private

Reference to confirmation panel that is shown when an ability is about to be upgraded.

◆ detailsOpen

bool AbilityInventoryUI.detailsOpen = false
private

True if the ability details panel is currently open.

◆ detailsPanel

GameObject AbilityInventoryUI.detailsPanel
private

Reference to the details panel of the ability inventory UI, which holds the UI elements for the more details display.

◆ emptyAbilityInfo

EmptyAbilityInfo AbilityInventoryUI.emptyAbilityInfo
private

Reference to Scriptables_EmptyAbilityInfo.

◆ iconData

AbilityInventoryItemData [] AbilityInventoryUI.iconData
private

List of data for the ability items.

◆ inventoryOpen

bool AbilityInventoryUI.inventoryOpen = false
private

True if the ability inventory is currently open.

◆ inventoryPanel

GameObject AbilityInventoryUI.inventoryPanel
private

Reference to the background panel of the ability inventory UI, which holds all the UI elements.

◆ mainCanvas

GameObject AbilityInventoryUI.mainCanvas
private

Reference to Canvas.prefab. This will be disabled while the ability inventory is open.

◆ scrollAnimationManager

ScrollAnimationManager AbilityInventoryUI.scrollAnimationManager
private

Reference to the scroll animation manager, which handles the animations of the scroll background.

Event Documentation

◆ abilityInventoryClosed

Action AbilityInventoryUI.abilityInventoryClosed
static

Invoked when the ability inventory is closed.

◆ abilityInventoryOpened

Action AbilityInventoryUI.abilityInventoryOpened
static

Invoked when the ability inventory is opened.

◆ abilityInventorySlotInitialized

Action AbilityInventoryUI.abilityInventorySlotInitialized
static

Invoked when the slots in the ability inventory have been initialized.


The documentation for this class was generated from the following file: