DocFX + Singulink = ♥

Class ColorSlot

Represents a color that may be configured by the user.

Inheritance
object
ColorSlot
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SlugBase.DataTypes
Assembly: SlugBase.dll
Syntax
public class ColorSlot

Constructors

View Source

ColorSlot(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.

View Source

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 Source

Default

The default color.

Declaration
public Color Default { get; set; }
Property Value
Type Description
Color
View Source

Index

The index of this color slot in PlayerGraphics.ColoredBodyPartList(SlugcatStats.Name).

Declaration
public int Index { get; }
Property Value
Type Description
int
View Source

Name

This color's name for use with PlayerColor.

Declaration
public string Name { get; }
Property Value
Type Description
string
View Source

Variants

The preset colors to use in multiplayer.

Declaration
public Color[] Variants { get; set; }
Property Value
Type Description
Color[]

Methods

View Source

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
Color

The color of this body part after modifications are applied.

View Source

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 slugcatCharacter from Variants, or Default if the index was out of range.