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

Detailed Description

This script goes on (as a component) the icons for the abilities on the ability hotbar and handles the drag and drop functionality.

Documentation updated 9/18/2024

Author
Roy Pascaul
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

void OnBeginDrag (PointerEventData eventData)
 Runs when the user begins to drag the icon. Prevents further mouse input to prevent conflicts (raycastTarget), remembers the now previous parent slot, and removes the icon as a child of the icon it was under.
 
void OnDrag (PointerEventData eventData)
 Runs every frame the user is dragging the icon. Sets the position of the icon to match the location of the cursor.
 
void OnEndDrag (PointerEventData eventData)
 Runs when the user stops dragging the icon and drops it. Re-enables mouse inputs (raycastTarget) and sets itself as a child of it's next parent.
 

Public Attributes

Transform previousParent
 The transform of the previous slot this icon was under.
 
Transform nextParent
 The transform of the next slot this icon will be under. This will be set to the correct value by AbilitySlotUI when it's time to drop the icon.
 

Properties

BaseAbilityInfo CurAbilityInfo [get, set]
 Reference the the ability info of the ability this icon represents.
 
Image CurImage [get, set]
 Reference to the image used as the icon for the ability.
 

Private Member Functions

void Awake ()
 Set the reference to the image used as the icon for this ability.
 

Member Function Documentation

◆ Awake()

void AbilityImageUI.Awake ( )
private

Set the reference to the image used as the icon for this ability.

◆ OnBeginDrag()

void AbilityImageUI.OnBeginDrag ( PointerEventData eventData)

Runs when the user begins to drag the icon. Prevents further mouse input to prevent conflicts (raycastTarget), remembers the now previous parent slot, and removes the icon as a child of the icon it was under.

◆ OnDrag()

void AbilityImageUI.OnDrag ( PointerEventData eventData)

Runs every frame the user is dragging the icon. Sets the position of the icon to match the location of the cursor.

◆ OnEndDrag()

void AbilityImageUI.OnEndDrag ( PointerEventData eventData)

Runs when the user stops dragging the icon and drops it. Re-enables mouse inputs (raycastTarget) and sets itself as a child of it's next parent.

Member Data Documentation

◆ nextParent

Transform AbilityImageUI.nextParent

The transform of the next slot this icon will be under. This will be set to the correct value by AbilitySlotUI when it's time to drop the icon.

◆ previousParent

Transform AbilityImageUI.previousParent

The transform of the previous slot this icon was under.

Property Documentation

◆ CurAbilityInfo

BaseAbilityInfo AbilityImageUI.CurAbilityInfo
getset

Reference the the ability info of the ability this icon represents.

◆ CurImage

Image AbilityImageUI.CurImage
getset

Reference to the image used as the icon for the ability.


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