Skill Web
  • Skill Web Documentation
  • đŸ•šī¸Quick Start
    • Installation
  • Start Developing
  • 💡General
    • Running the Demos
  • Menu Options
  • UI Customizations
    • uGUI
      • Skill Node
      • Connection Line
      • Web View
      • Hovercard
  • Datasets
  • 🎓Tutorials
    • Runes Demo Walkthrough
  • âœī¸Editors
    • Skill Bank
  • Web Creator
  • Settings
  • Components
    • Skill Web Initializer
    • uGUI
      • Skill Node UGUI
      • Connection Line
        • Curved Connection Line
      • Web View UGUI
        • Web View Selector UGUI
      • Skill Hovercard UGUI
    • Player Web Link
  • 📄Scripting API
    • Initialization
  • Skills
    • Skill
      • Skill Dataset Attributes
    • Skill Node
  • Webs
    • Web Graph
    • Web
  • UI
    • Loading a Web
    • Web View Input Handling
    • Customize Connection Line
    • Customize Hovercard
  • Player Web Link
  • Custom Logic
  • Saving & Loading
  • Events
  • Skill Web Settings
  • Procedural Generation (Beta)
  • đŸ› ī¸Support
    • Getting Help
  • 📚Changelogs
    • Latest Releases
    • Future Plans
    • ⭐Rate Me?
Powered by GitBook
On this page
  • Fields & Properties
  • Creating a Skill Node
  • Notable Methods
  • Get Icon
  • Set Level
  • Reset Level
  • Try Upgrade
  • Try Downgrade
  1. Skills

Skill Node

A version of the Skill class that can be used by a Web.

The SkillNode class is the main class you'll be working with at runtime, as they are the obtainable skills.

Fields & Properties

Name
Description
Type
Access

web

The web that this skill is a part of.

Web

public

skill

The skill.

Skill

public

state

The current state of the skill node.

Skill.State

public

hasConnectionDependency

Dictates whether this skill should become unlockable only if it has a direct connection to another skill that is obtained.

bool

public

uiRefresher

An action that refreshes the UI. This is invoked when the skill state is updated.

Action

public

dataset

The dataset. This is cloned from the Skill reference.

SkillDataset

public

Level

The current skill level.

int

public

MaxLevel

The max skill level.

int

public

IsLocked

If the skill node is locked.

bool

public

IsUnlocked

If the skill is unlocked.

bool

public

IsObtained

If the skill has been obtained (leveled up atleast once).

bool

public

IsMaxed

If the skill has been maxed.

bool

public

IsUpgradable

If the skill can be upgraded (unlocked and not maxed).

bool

public

Creating a Skill Node

Creating a SkillNode requires a skill node ID (int), a reference to a Skill, and a Vector2 position.

var mySkill = SkillWeb.GetSkill("My Skill");
var mySkillNode = new SkillNode(0, mySkill, Vector2.zero);

If you're creating your own procedural generation algorithm, you can get an available node ID from a WebGraph with the webGraph.GetAvailableNodeID method.

Notable Methods

Get Icon

The GetIcon method gets the icon (Skill.SkillIcon) of the skill node based on its current state.

var skillIcon = mySkillNode.GetIcon();

Set Level

The SetLevel method sets the skill node level.

// Set skill level to 1
mySkillNode.SetLevel(1);

Reset Level

The ResetLevel method sets the skill node level to 0.

mySkillNode.ResetLevel();

Try Upgrade

The TryUpgrade method attempts to level up the skill node by 1. This will return false if the skill is locked, the level requirement is not met, or the skill is already maxed.

bool success = mySkillNode.TryUpgrade();

Try Downgrade

The TryDowngrade method attempts to level down the skill node by 1. This will return false work if the skill level is 0 or downgrading is disabled.

bool success = mySkillNode.TryDowngrade();
PreviousSkill Dataset AttributesNextWebs

Last updated 11 days ago