Table of Contents

Struct SkinnedKey

Namespace
PolyMod
Assembly
PolyMod.dll

The key of a unit prefab: a unit type, a tribe, and a skin.

public readonly struct SkinnedKey : IEquatable<SkinnedKey>
Implements
Inherited Members

Constructors

SkinnedKey(Type, TribeType, SkinType)

Makes a key from a unit type, a tribe, and a skin.

[JsonConstructor]
public SkinnedKey(UnitData.Type unitType, TribeType tribeType, SkinType skinType)

Parameters

unitType UnitData.Type

The unit type.

tribeType TribeType

The tribe.

skinType SkinType

The skin.

Properties

skinType

Gets the skin.

[JsonInclude]
[JsonConverter(typeof(EnumCacheJson<SkinType>))]
public SkinType skinType { get; }

Property Value

SkinType

tribeType

Gets the tribe.

[JsonInclude]
[JsonConverter(typeof(EnumCacheJson<TribeType>))]
public TribeType tribeType { get; }

Property Value

TribeType

unitType

Gets the unit type.

[JsonInclude]
[JsonConverter(typeof(EnumCacheJson<UnitData.Type>))]
public UnitData.Type unitType { get; }

Property Value

UnitData.Type

Methods

Equals(SkinnedKey)

Compares this key with another key.

public bool Equals(SkinnedKey other)

Parameters

other SkinnedKey

The key to compare.

Returns

bool

True when the unit type, the tribe, and the skin are all equal, otherwise false.

Equals(object?)

Compares this key with an object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare.

Returns

bool

True when the object is a SkinnedKey that is equal to this key, otherwise false.

GetHashCode()

Gets the hash code of the key.

public override int GetHashCode()

Returns

int

A hash code that combines the unit type, the tribe, and the skin.

Operators

operator ==(SkinnedKey, SkinnedKey)

Compares two keys.

public static bool operator ==(SkinnedKey left, SkinnedKey right)

Parameters

left SkinnedKey

The first key.

right SkinnedKey

The second key.

Returns

bool

True when the keys are equal, otherwise false.

operator !=(SkinnedKey, SkinnedKey)

Compares two keys.

public static bool operator !=(SkinnedKey left, SkinnedKey right)

Parameters

left SkinnedKey

The first key.

right SkinnedKey

The second key.

Returns

bool

True when the keys are not equal, otherwise false.