Show / Hide Table of Contents

Class SkillManager

Handles all logic that has to do with skills, and registering custom skills

Inheritance
System.Object
Manager
SkillManager
Namespace: JotunnLib.Managers
Assembly: JotunnLib.dll
Syntax
public class SkillManager : Manager

Properties

| Improve this Doc View Source

Instance

Global singleton instance of the manager

Declaration
public static SkillManager Instance { get; }
Property Value
Type Description
SkillManager

Methods

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

RegisterSkill(SkillConfig, Boolean)

Register a new skill with given SkillConfig object, and registers translations for it in the current localization

Declaration
public Skills.SkillType RegisterSkill(SkillConfig skillConfig, bool registerLocalizations = true)
Parameters
Type Name Description
SkillConfig skillConfig

SkillConfig object representing new skill to register

System.Boolean registerLocalizations
Returns
Type Description
Skills.SkillType

The SkillType of the newly registered skill

| Improve this Doc View Source

RegisterSkill(String, String, Single, Sprite)

DEPRECATED DUE TO POSSIBLE CONFLICT ISSUE, see: GitHub Issue

Register a new skill with given parameters, and registers translations for it in the current localization

Declaration
[Obsolete("Use `RegisterSkill(SkillConfig config)` instead. This method could potentially cause users to lose skill save progress", true)]
public Skills.SkillType RegisterSkill(string name, string description, float increaseStep = 1F, Sprite icon = null)
Parameters
Type Name Description
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

| Improve this Doc View Source

RegisterSkill(String, String, String, Single, Sprite, Boolean)

Register a new skill with given parameters, and registers translations for it in the current localization

Declaration
public Skills.SkillType RegisterSkill(string identifer, string name, string description, float increaseStep = 1F, Sprite icon = null, bool registerLocalizations = true)
Parameters
Type Name Description
System.String identifer

Unique identifier of the new skill, ex: "com.jotunnlib.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

System.Boolean registerLocalizations
Returns
Type Description
Skills.SkillType

The SkillType of the newly registered skill

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX