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

Detailed Description

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

Author
Roy Pascual
Note
This is a temporary feature and in the future you will not be able to drag the icons around without going to the Skyhub.

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.
 

Member Function Documentation

◆ DropEvent()

delegate void AbilitySlotUI.DropEvent ( int slotNumber)

Delegate used to create DroppedUIEvent.

◆ OnDrop()

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.

◆ Start()

void AbilitySlotUI.Start ( )
private

Set reference to AbilityImageUI object that's in this slot.

◆ SubscribeToDrop()

void AbilitySlotUI.SubscribeToDrop ( TotalAbilityUI totalAbilityUI)

Subscribes totalAbilityUI.SlotDropListener() to DroppedUIEvent. Run by the TotalAbilityUI object that governs the ability hotbar system.

◆ UnsubscribeFromDrop()

void AbilitySlotUI.UnsubscribeFromDrop ( TotalAbilityUI totalAbilityUI)

Unsubscribes totalAbilityUI.SlotDropListener() from DroppedUIEvent. Run by the TotalAbilityUI object that governs the ability hotbar system.

Member Data Documentation

◆ CurCooldownVisualUI

CooldownVisualUI AbilitySlotUI.CurCooldownVisualUI

Reference to the CooldownVisualUI object that is in this slot.

◆ slotID

int AbilitySlotUI.slotID = 0

The ID number of this slot. 0 - offense slot, 1 - defense slot, 2 - utility slot, 3 - passive slot.

Property Documentation

◆ CurAbilityImageUI

AbilityImageUI AbilitySlotUI.CurAbilityImageUI
getset

Reference to the AbilityImageUI object that is in this slot, which represents the ability's icon that can be dragged and dropped.

Event Documentation

◆ DroppedUIEvent

DropEvent AbilitySlotUI.DroppedUIEvent

Triggered when totalAbilityUI.SlotDropListener() is run.


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