SkillBarElement

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

Implementation

public class SkillBarElement : MonoBehaviour

Inheritance

MonoBehaviour --> SkillBarElement

Fields

Name

Description

target

Target to which the skill bar belongs to

keyCode

Key code to execute the skill assigned to this element

skillIcon

Icon of the skill

skillNotAssigned

Icon when no skill is assigned

skillCooldownIcon

Icon when the skill is in cooldown

showSkillExecutingIcon

Boolean value to determine whether to show an icon

when the skill is executing

skillExecutingIcon

Icon when the skill is executing

showKeyCodeText

Boolean value to determine whether to show the

key code text for this element

keyCodeText

Text to show which indicates which key to press to execute

the skill assigned to this element

showExecutingTimeCounter

Boolean value to determine whether to show the remaining execution time

executingTimeCounter

Text component reference for the remaining execution time

showCooldownCounter

Boolean value to determine whether to show the remaining cooldown time

cooldownCounter

Text component reference for the remainin cooldown time

showAmountCounter

Boolean value to determine whether to show the remaining skill executions of a stored skill

amountCounter

Text component reference for the remaining skill executions of a stored skill

skill

The skill assigned to this element

executer

Variable which holds the Skills component of the target

(the one who executes the skills)

Methods

Name

Description

Start()

Initializes the executer and UI

Update()

Checks for input to execute the assigned skill

SetupEvents(EventTriggerType, UnityAction)

Sets up the event callbacks

ExecuteSkill()

Executes the current assigned skill

SyncSkill(SkillAsset)

Synchronizes a skill with the one from the skill tree skill bar

StartSkillExecutionGUI()

Updates the GUI when a skill is executing

UpdateUI()

Updates the icons and the key code text

CancelSkillBarSkillExecution()

Cancels the updating of the GUI when cancelling the skill execution