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