Class SkillManager
Manager for handling custom skills added to the game.
Inheritance
System.Object
SkillManager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Jotunn.Managers
Assembly: Jotunn.dll
Syntax
public class SkillManager : IManager
Properties
| Improve this Doc View SourceInstance
Global singleton instance of the manager.
Declaration
public static SkillManager Instance { get; }
Property Value
Type | Description |
---|---|
SkillManager |
Methods
| Improve this Doc View SourceAddSkill(SkillConfig)
Add a new skill with given SkillConfig object.
Declaration
public Skills.SkillType AddSkill(SkillConfig skillConfig)
Parameters
Type | Name | Description |
---|---|---|
SkillConfig | skillConfig | SkillConfig object representing new skill to register |
Returns
Type | Description |
---|---|
Skills.SkillType | The SkillType of the newly added skill |
AddSkill(String, String, String, Single, Sprite)
Register a new skill with given parameters, and registers translations for it in the current localization.
Declaration
[Obsolete("Use AddSkill(SkillConfig) instead")]
public Skills.SkillType AddSkill(string identifer, string name, string description, float increaseStep = 1F, Sprite icon = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | identifer | Unique identifier of the new skill, ex: "com.jotunn.testmod.testskill" |
System.String | name | Name of the new skill |
System.String | description | Description of the new skill |
System.Single | increaseStep | |
Sprite | icon | Icon for the skill |
Returns
Type | Description |
---|---|
Skills.SkillType | The SkillType of the newly registered skill |
AddSkillsFromJson(String)
Adds skills defined in a JSON file at given path, relative to BepInEx/plugins
Declaration
public void AddSkillsFromJson(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | JSON file path, relative to BepInEx/plugins folder |
GetSkill(Skills.SkillType)
Gets a custom skill with given SkillType.
Declaration
public Skills.SkillDef GetSkill(Skills.SkillType skillType)
Parameters
Type | Name | Description |
---|---|---|
Skills.SkillType | skillType | SkillType to look for |
Returns
Type | Description |
---|---|
Skills.SkillDef | Custom skill with given SkillType |
GetSkill(String)
Gets a custom skill with given skill identifier.
Declaration
public Skills.SkillDef GetSkill(string identifier)
Parameters
Type | Name | Description |
---|---|---|
System.String | identifier | String indentifer of SkillType to look for |
Returns
Type | Description |
---|---|
Skills.SkillDef | Custom skill with given SkillType |
Init()
Initialize the manager
Declaration
public void Init()