SkillTreeUIManager

Contains the logic for handling the skill tree UI.

Implementation

public class SkillTreeUIManager : MonoBehaviour

Inheritance

​MonoBehaviour --> SkillTreeUIManager​

Fields

Name

Description

​TIME_LAYER​

Defines the value for the time layer

​DATABASE_SKILLS​

Reference for the skills database

​skillTreeAnimator​

The animator component of this gameobject

​skillTreeRoot​

The root gameobject of the skill tree

​isOpen​

Boolean value indicating if the skill tree is open or closed

​canvasScaler​

The CanvasScaler component of the UI

​floatingSkillRt​

The RectTransform component of the floatingSkill gameobject

​skillTreeOpener​

The Skills component of the gameobject opening this skill tree

​skillBarElements​

The skill bar elements of this skill tree

​skillPointsLeft​

Reference of type Text for displaying the skill points of the skill tree opener

​skillsContent​

Reference to the SkillTreeItemsUI component of the gameobject which has all skills under it

​floatingSkill​

Image component of the gameobject used for the drag/drop functionality

​skillContextMenu​

Context menu of a skill

Methods

Name

Description

​Awake()​

Awake is called when the script instance is being loaded.

​Open(Skills)​

Opens the skill tree UI for this gameobject

​Close()​

Closes the skill tree UI for this gameobject

​EnterSkillBarConfigurationMode(SkillAsset)​

Enters the configuration mode for the skill bar

​LeaveSkillBarConfigurationMode()​

Exits the configuration mode for the skill bar

​SkillRemoveFromSkillBar(SkillAsset)​

Removes a skill from the skill bar

​SetSkillTreeOpenerReferences(Skills)​

Sets the skill tree opener references

​ResetAllSkills()​

Resets all skills

​ResetSkill(SkillHolder)​

Resets a skill

​UpdateSkillPoints()​

Updates the skill points text

​HideSkillContextMenu()​

Hides the context menu of a skill

​UpdateSkillBar(SkillHolder)​

Updates the skill bar

​OnDragSkill(Sprite, bool)​

Sets the drag/drop image to the dragged skill and changes the position according to the pointer

​IsOpen()​

Returns a boolean value for the open state of the skill tree UI

​ChangeState(bool)​

Changes the state of the skill tree UI

​ResetSkillBar()​

Resets the skill bar

​ResetSkillBar(SkillAsset)​

Resets the skill bar where the passed skill is used

​GetPointerPositionUnscaled(Vector2)​

Gets the position of the pointer in unscaled form