Skill Node UGUI
π― SkillNodeUGUI Class
A uGUI object that represents a SkillNode.
Namespace:
Esper.SkillWeb.UI.UGUI
Inherits from:MonoBehaviour
Implements:ISkillNodeUI
,IPointerEnterHandler
,IPointerExitHandler
,IPointerClickHandler
Type:class
π¦ Fields
public
skillNode
SkillNode
The skill node.
public
webView
WebViewUGUI
The web view reference.
public
rectTransform
RectTransform
The RectTransform component.
public
iconImage
Image
The image component that displays the skill icon.
public
levelText
TextMeshProUGUI
The text component that displays the level text.
public
hasPointerHover
bool
If the pointer is hovering this node.
protected
pointerUpgradeButton
PointerEventData.InputButton
The pointer upgrade button.
protected
pointerDowngradeButton
PointerEventData.InputButton
The pointer downgrade button.
π Properties
public static
onStateChanged
UnityEvent<SkillNodeUGUI>
A callback for when any skill node's state is changed. This accepts 1 argument: the affected skill node (SkillNodeUGUI).
public static
onUpgrade
UnityEvent<SkillNodeUGUI>
A callback for when any skill node is upgraded. This accepts 1 argument: the affected skill node (SkillNodeUGUI).
public static
onDowngrade
UnityEvent<SkillNodeUGUI>
A callback for when any skill node is downgraded. This accepts 1 argument: the affected skill node (SkillNodeUGUI).
public static
onPointerEnter
UnityEvent<SkillNodeUGUI>
A callback for when any skill node is hovered. This accepts 1 argument: the affected skill node (SkillNodeUGUI).
public static
onPointerExit
UnityEvent<SkillNodeUGUI>
A callback for when any skill node stops being hovered. This accepts 1 argument: the affected skill node (SkillNodeUGUI).
π§° Methods
public
SetSkill(SkillNode, WebViewUGUI)
void
Sets the skill node that this object represents.
public
ResetLevel()
void
Resets the skill level to 0.
public
Refresh()
void
Refreshes this UI object.
public
GetConnections(hasObtainedSkillOnly)
List<ConnectionUGUI>
Creates a list of all connections of this skill node.
public virtual
TryUpgrade()
bool
Increases the level by 1 if possible. The skill must be unlocked and the level cannot be higher than the max level.
public virtual
TryDowngrade()
bool
Decreases the level by 1 if possible. The level cannot be lower than 0.
public
ReloadUI()
void
Refreshes the skill UI and the UI for each connection.
public
HighlightPaths()
void
Highlights direct connections to this node if the other node in the connection is obtained or doesn't exist.
public
UnhighlightPaths()
void
Unhighlights direct connections to this node.
public
OnPointerEnter(PointerEventData)
void
Handles pointer enter events.
public
OnPointerExit(PointerEventData)
void
Handles pointer exit events.
public
OnPointerClick(PointerEventData)
void
Handles pointer click events.
Last updated