![]() |
Eye of the Nile Docs
Everything you need to know to get started!
|
This script goes on (as a component) the slots of the ability hotbar and handles displaying ability icons and swapping icons when drag and dropping.
Documentation updated 9/18/2024
Public Member Functions | |
delegate void | DropEvent (int slotNumber) |
Delegate used to create DroppedUIEvent. | |
void | SubscribeToDrop (TotalAbilityUI totalAbilityUI) |
Subscribes totalAbilityUI.SlotDropListener() to DroppedUIEvent. Run by the TotalAbilityUI object that governs the ability hotbar system. | |
void | UnsubscribeFromDrop (TotalAbilityUI totalAbilityUI) |
Unsubscribes totalAbilityUI.SlotDropListener() from DroppedUIEvent. Run by the TotalAbilityUI object that governs the ability hotbar system. | |
void | OnDrop (PointerEventData eventData) |
Runs when the user drags and drops an icon above this slot. Adds the icon (AbilityImageUI object) dropped on this slot to this slot. If there's a icon already in this slot, put it in the slot the dropped icon came from. | |
Public Attributes | |
int | slotID = 0 |
The ID number of this slot. 0 - offense slot, 1 - defense slot, 2 - utility slot, 3 - passive slot. | |
CooldownVisualUI | CurCooldownVisualUI |
Reference to the CooldownVisualUI object that is in this slot. | |
Properties | |
AbilityImageUI | CurAbilityImageUI [get, set] |
Reference to the AbilityImageUI object that is in this slot, which represents the ability's icon that can be dragged and dropped. | |
Events | |
DropEvent | DroppedUIEvent |
Triggered when totalAbilityUI.SlotDropListener() is run. | |
Private Member Functions | |
void | Start () |
Set reference to AbilityImageUI object that's in this slot. | |
delegate void AbilitySlotUI.DropEvent | ( | int | slotNumber | ) |
Delegate used to create DroppedUIEvent.
void AbilitySlotUI.OnDrop | ( | PointerEventData | eventData | ) |
Runs when the user drags and drops an icon above this slot. Adds the icon (AbilityImageUI object) dropped on this slot to this slot. If there's a icon already in this slot, put it in the slot the dropped icon came from.
|
private |
Set reference to AbilityImageUI object that's in this slot.
void AbilitySlotUI.SubscribeToDrop | ( | TotalAbilityUI | totalAbilityUI | ) |
Subscribes totalAbilityUI.SlotDropListener() to DroppedUIEvent. Run by the TotalAbilityUI object that governs the ability hotbar system.
void AbilitySlotUI.UnsubscribeFromDrop | ( | TotalAbilityUI | totalAbilityUI | ) |
Unsubscribes totalAbilityUI.SlotDropListener() from DroppedUIEvent. Run by the TotalAbilityUI object that governs the ability hotbar system.
CooldownVisualUI AbilitySlotUI.CurCooldownVisualUI |
Reference to the CooldownVisualUI object that is in this slot.
int AbilitySlotUI.slotID = 0 |
The ID number of this slot. 0 - offense slot, 1 - defense slot, 2 - utility slot, 3 - passive slot.
|
getset |
Reference to the AbilityImageUI object that is in this slot, which represents the ability's icon that can be dragged and dropped.
DropEvent AbilitySlotUI.DroppedUIEvent |
Triggered when totalAbilityUI.SlotDropListener() is run.