SkillUI
Contains the logic for handling the UI of the shown skills in the skill tree UI.
Implementation
Inheritance
MonoBehaviour --> SkillUI
Fields
Name
Description
Reference to the skills database
The button component of this gameobject
The SkillTreeUIManager component of the skill tree
The Skills component of the opener of the skill tree
References the enabled skill connector used between two skills
References the disabled skill connector used between two skills
Image component used for the icon when the skill is unlocked
Image component used for the icon when the skill is locked
Image component used for the skill icon in the tooltip
Text component where the name of the skill will be shown
Text component where the description of the skill will be shown
Text component where the required level will be shown
Text component where the required skill points will be shown
Text component where the state will be shown
Color value for tooltipSkillStateValue when locked
Color value for tooltipSkillStateValue when unlocked
Image component that shows if a skill is locked
Image component that shows if a skill is unlocked
The RectTransform component of this gameobject
Prefab of the context menu
The current context menu that is shown/was last shown
Defines the logic that will be executed when you start hovering over the skill
Defines the logic that will be executed when you exit hovering over the skill
Methods
Name
Description
Setup(Skills, SkillAsset, Skill.SkillState)
Calls different methods for the setup of the UI and events
UpdateUI(SkillAsset, Skill.SkillState)
Updates the UI
OnClick()
Called when left-clicking on the image
OnClickRight()
Called when right-clicking on the image
ShowSkillContextMenu(int, GameObject, RectTransform)
Shows the context menu for the skill
HideSkillContextMenu()
Hides the context menu
AddButtonListeners(SkillContextMenuUI, int)
Adds the button listeners for the different context menu buttons
SetButtonVisibility(int, SkillContextMenuUI)
Sets the context menu button's visibility
UnlockSkill(int)
Called when clicking on the Unlock Skill
button
SkillAddToSkillBar(int)
Called when clicking on the Add To Skill Bar
button
SkillRemoveFromSkillBar(int)
Called when clicking on the Remove From Skill Bar
button
SetupEvents(EventTriggerType, UnityAction)
Sets up the events for the skill dragging
OnPointerEnter(BaseEventData)
Called when the mouse pointer enters the UI area
OnPointerExit(BaseEventData)
Called when the mouse pointer exits the UI area
Called when starting to drag a skill
Called when stopping to drag a skill
Called when dragging a skill
Properties
Name
Description
Contains a reference to the skill of this element
Last updated