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
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.
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.
Set Level
The SetLevel
method sets the skill node level.
Reset Level
The ResetLevel
method sets the skill node level to 0
.
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.
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.
Last updated