![]() |
Eye of the Nile Docs
Everything you need to know to get started!
|
Governs the ability hotbar in the bottom left corner of the screen (Prefabs_Abilities_AbilitySlots). Updates the display ActiveAbilityData when the icons are moved or changed (including on first load).
Documentation updated 9/18/2024
Public Member Functions | |
void | SlotDropListener (int slotNumber) |
This function is subscribed to the Drop event of each AbilitySlotUI. When an ability is dropped into that slot, refresh then display it. | |
void | UpdateSlotCooldownVisual (int slot, float fillPercentage) |
Runs SetFillPercentage in CooldownVisualUI for the given slot. | |
Public Attributes | |
ActiveAbilityData | equippedAbilities |
Reference to Scriptables_ActiveAbilties, which stores all the ability info of the currently equipped abilities. | |
AbilitySlotUI | abilitySlotUIPrefab |
Reference to Prefabs_Abilities_AbilitySlotUI. One will be created for each ability type. | |
AbilityImageUI | abilityImageUIPrefab |
Reference to Prefabs_Abilities_AbilityImageUI. One will be created for each equipped ability. | |
Private Member Functions | |
void | OnEnable () |
Shortly after the object is created or re-enabled, subscribe InitializeAllSlots() to AbilityInventoryUI.abilityInventoryClosed. This will re-initalize all slots when the ability inventory UI closes. | |
void | OnDisable () |
When the object is disabled, unsubscribe InitializeAllSlots() to AbilityInventoryUI.abilityInventoryClosed. | |
void | RefreshAbilityAtSlot (int slotNumber) |
Retrieves the ability at the given slot and updates Scriptables_ActiveAbilties to reflect any changes. | |
void | DisplayAbilityAtSlot (int slotNumber) |
Sets the sprite of the ability icon in each slot to the corresponding ability's sprite. If no icon is currently in that slot, one is created. | |
void | InitializeAllSlots () |
Creates all slots in the UI (destroying them first if they already exist), then sets the slotIDs of each slot and subscribes to each AbilitySlotUI. | |
void | Awake () |
Set reference to the DataManager. | |
void | Start () |
Run InitializeAllSlots() when the object is first created and if the player has unlocked abilities yet. | |
Private Attributes | |
DataManager | dataManager |
Reference to the data manager. | |
AbilitySlotUI[] | abilitySlotsUI |
List of ability slots (AbilitySlotUI objects). | |
Static Private Attributes | |
const int | MAX_SLOTS = 4 |
The maximum amount of ability slots. | |
|
private |
Set reference to the DataManager.
|
private |
Sets the sprite of the ability icon in each slot to the corresponding ability's sprite. If no icon is currently in that slot, one is created.
|
private |
Creates all slots in the UI (destroying them first if they already exist), then sets the slotIDs of each slot and subscribes to each AbilitySlotUI.
|
private |
When the object is disabled, unsubscribe InitializeAllSlots() to AbilityInventoryUI.abilityInventoryClosed.
|
private |
Shortly after the object is created or re-enabled, subscribe InitializeAllSlots() to AbilityInventoryUI.abilityInventoryClosed. This will re-initalize all slots when the ability inventory UI closes.
|
private |
Retrieves the ability at the given slot and updates Scriptables_ActiveAbilties to reflect any changes.
void TotalAbilityUI.SlotDropListener | ( | int | slotNumber | ) |
This function is subscribed to the Drop event of each AbilitySlotUI. When an ability is dropped into that slot, refresh then display it.
|
private |
Run InitializeAllSlots() when the object is first created and if the player has unlocked abilities yet.
void TotalAbilityUI.UpdateSlotCooldownVisual | ( | int | slot, |
float | fillPercentage ) |
Runs SetFillPercentage in CooldownVisualUI for the given slot.
AbilityImageUI TotalAbilityUI.abilityImageUIPrefab |
Reference to Prefabs_Abilities_AbilityImageUI. One will be created for each equipped ability.
|
private |
List of ability slots (AbilitySlotUI objects).
AbilitySlotUI TotalAbilityUI.abilitySlotUIPrefab |
Reference to Prefabs_Abilities_AbilitySlotUI. One will be created for each ability type.
|
private |
Reference to the data manager.
ActiveAbilityData TotalAbilityUI.equippedAbilities |
Reference to Scriptables_ActiveAbilties, which stores all the ability info of the currently equipped abilities.
|
staticprivate |
The maximum amount of ability slots.