Class SlugBaseCharacter
A character added by SlugBase.
Inheritance
Inherited Members
Namespace: SlugBase
Assembly: SlugBase.dll
Syntax
public class SlugBaseCharacter
Properties
Description
A description of this character that appears on the select menu.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DisplayName
The displayed name of this character, such as "The Survivor", "The Monk", or "The Hunter".
Declaration
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Features
Settings, abilities, or other Features of this character.
Declaration
public SlugBaseCharacter.FeatureList Features { get; }
Property Value
Type | Description |
---|---|
SlugBaseCharacter.FeatureList |
Name
This character's unique name.
Declaration
public SlugcatStats.Name Name { get; }
Property Value
Type | Description |
---|---|
SlugcatStats.Name |
Registry
Stores all registered SlugBaseCharacters.
Declaration
public static JsonRegistry<SlugcatStats.Name, SlugBaseCharacter> Registry { get; }
Property Value
Type | Description |
---|---|
JsonRegistry<SlugcatStats.Name, SlugBaseCharacter> |
Methods
Create(String)
Creates a new, blank SlugBaseCharacter.
Declaration
public static SlugBaseCharacter Create(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The new character's unique ID. |
Returns
Type | Description |
---|---|
SlugBaseCharacter | A new SlugBaseCharacter with a default name, default description, and no features. |
Remarks
Use DisplayName, Description, and Features to customize this character.
Get(SlugcatStats.Name)
Gets a SlugBaseCharacter by name
.
Declaration
public static SlugBaseCharacter Get(SlugcatStats.Name name)
Parameters
Type | Name | Description |
---|---|---|
SlugcatStats.Name | name | The SlugcatStats.Name to search for. |
Returns
Type | Description |
---|---|
SlugBaseCharacter | The SlugBaseCharacter, or |
TryGet(SlugcatStats.Name, out SlugBaseCharacter)
Gets a SlugBaseCharacter by name
.
Declaration
public static bool TryGet(SlugcatStats.Name name, out SlugBaseCharacter character)
Parameters
Type | Name | Description |
---|---|---|
SlugcatStats.Name | name | The SlugcatStats.Name to search for. |
SlugBaseCharacter | character | The SlugBaseCharacter with the given |
Returns
Type | Description |
---|---|
System.Boolean |
|
Events
Refreshed
Occurs when any SlugBaseCharacter's JSON file is modified, after all features have been loaded.
Declaration
public static event EventHandler<SlugBaseCharacter.RefreshEventArgs> Refreshed
Event Type
Type | Description |
---|---|
System.EventHandler<SlugBaseCharacter.RefreshEventArgs> |
Remarks
This event is only raised when in-game.