SkillBarSkillTreeElement

Contains the logic for the skillbar visible inside the skill tree UI.

Implementation

public class SkillBarSkillTreeElement : MonoBehaviour

Inheritance

MonoBehaviour --> SkillBarSkillTreeElement

Fields

Name

Description

DATABASE_SKILLS

Contains a reference to the skills database

keyCode

Key code to execute the skill assigned to this element

acceptSkillTypes

Selection for which skill types are allowed to be assigned

skillIcon

Icon of the skill

skillNotAssigned

Icon when no skill is assigned

iconSkillBarConfigurationModeOn

Sprite for when the skillbar configuration mode is on

iconSkillBarConfigurationModeOff

Sprite for when the skillbar configuration mode is off

keyCodeText

Text component for the key code in the UI

showKeyCodeText

Boolean value to determine whether or not to show the key code

allowReplacement

Boolean value to determine whether to allow replacement on the skill bar

allowQuickRemoval

Boolean value to determine whether to allow the quick removal feature on the skill bar

skillInConfigurationMode

The skill that is in configuration mode

eventOnHoverEnter

Event that is called when hovering over this component

eventOnHoverExit

Event that is called when stopping hovering over this component

skill

The skill assigned to this element

executer

The Skills component of the skill tree opener

skillBarConfigurationModeOn

Boolean value to determine whether or not the skill bar is in configuration mode

skillTreeUIManager

The SkillTreeUIManager component of the skill tree

skillBarSkillTreeElementIndex

The index of this element in the skill bar

Methods

Name

Description

Start()

Initializes the events, executer and UI

Update()

Checks for input to bind a skill to this element

SetupEvents(EventTriggerType, UnityAction)

Sets up the event callbacks

BindSkill(SkillAsset)

Binds a skill to this element

UnbindSkill()

Unbinds a skill from this element

EnterSkillBarConfigurationMode()

Enters the configuration mode for this element

LeaveSkillBarConfigurationMode()

Leaves the configuration mode for this element

RemoveSkillFromSkillBar(SkillAsset)

Removes a skill from this element

GetSkill()

Gets the skill of this element

UpdateUI()

Updates the UI of this element

OnPointerEnter(BaseEventData)

Method when hovering over this element

OnPointerExit(BaseEventData)

Method when stop hovering over this element

OnDragBegin(BaseEventData)

Called when starting to drag a skill

OnDragEnd(BaseEventData)

Called when letting the dragged skill go

OnDragMove(BaseEventData)

Called when dragging the skill around