Web
The runtime version of the WebGraph.
The Web
class is the runtime version of a WebGraph
.
Fields & Properties
graph
The graph reference which is created with the Web Creator. This graph is used to create the actual runtime graph.
WebGraph
public
skillNodes
A dictionary of skill nodes.
Dictionary<int, SkillNode>
public
revertableState
The revertable graph state simply as a dictionary where the key is the skill node ID and the value is the skill node level.
Dictionary<int, int>
protected
Connections
A list of all skill connections.
List<Connection>
public
revertableSkillPoints
The skill points set when the graph is reverted.
int
protected
isReverting
If the graph is currently reverting. This flag is automatically set as needed when RevertChanges is called.
bool
public
HasUnsavedChanges
If there are unsaved changes made to the graph.
bool
public
Creating a Web
To create a web you need a reference to a WebGraph
or a SavableWeb
.
Notable Methods
Reset All Skills
The ResetAllSkills
method simply resets the level of all skills.
Confirm Changes
The ConfirmChanges
method confirms the changes made to the graph.
Revert Changes
The RevertChanges
method reverts the changes made to the graph.
Get Node
The GetNode
method gets a SkillNode
by its node ID. This is not the skill ID.
Get Skill Node
You can get the first SkillNode
by its skill ID or skill name with the GetSkillNode
method.
Alternatively, you can use GetSkillNodes
to get all skills in the graph with a matching skill ID or skill name.
By State
You can get all skill nodes in specific states with the GetSkillNodes
method.
Getting all obtained nodes has a special method called GetObtainedSkillNodes
.
Is Node Obtained
The IsNodeObtained
method checks if a skill node with a specific node ID is obtained. This node ID is not the same as the skill ID.
Is Obtained
The IsObtained
method checks if a skill node with a specific skill ID or skill name is obtained.
Last updated