Class ColorSlot
Represents a color that may be configured by the user.
Inherited Members
Namespace: SlugBase.DataTypes
Assembly: SlugBase.dll
Syntax
public class ColorSlot
Constructors
View SourceColorSlot(int, JsonAny)
Create a ColorSlot from JSON.
Declaration
public ColorSlot(int index, JsonAny json)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index for use with PlayerGraphics.ColoredBodyPartList(SlugcatStats.Name). |
JsonAny | json | The JSON to load. |
ColorSlot(int, string)
Create an empty ColorSlot.
Declaration
public ColorSlot(int index, string name)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index for use with PlayerGraphics.ColoredBodyPartList(SlugcatStats.Name). |
string | name | The name of the body part this colors. |
Properties
View SourceDefault
The default color.
Declaration
public Color Default { get; set; }
Property Value
Type | Description |
---|---|
Color |
Index
The index of this color slot in PlayerGraphics.ColoredBodyPartList(SlugcatStats.Name).
Declaration
public int Index { get; }
Property Value
Type | Description |
---|---|
int |
Name
This color's name for use with PlayerColor.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
Variants
The preset colors to use in multiplayer.
Declaration
public Color[] Variants { get; set; }
Property Value
Type | Description |
---|---|
Color[] |
Methods
View SourceGetColor(PlayerGraphics)
Gets the color of this slot for a given player.
Declaration
public Color GetColor(PlayerGraphics graphics)
Parameters
Type | Name | Description |
---|---|---|
PlayerGraphics | graphics | The player graphics to get the color from. |
Returns
Type | Description |
---|---|
Color | The color of this body part after modifications are applied. |
GetColor(int)
Gets a color variant from Variants by index.
Declaration
public Color GetColor(int slugcatCharacter)
Parameters
Type | Name | Description |
---|---|---|
int | slugcatCharacter | The index. |
Returns
Type | Description |
---|---|
Color | The color for |