Class WornClothes
WornClothes is a wrapper around Clothes that additionally stores the colors and whether or not the clothes are from the ClothesStorage or not
[DataContract]
public class WornClothes
- Inheritance
-
WornClothes
- Inherited Members
- Extension Methods
Constructors
WornClothes(Clothes, int[])
Creates a new worn Clothes instance with the given settings
public WornClothes(Clothes type, int[] colors)
Parameters
Fields
Colors
The colors of this Clothes instance. Each index references the color of the underlying Type's Colors. The actual color can be retrieved easily using Get(int[], int).
[DataMember]
public int[] Colors
Field Value
- int[]
CustomPrice
An optional custom price that this clothing item has over its regular price (GetPrice()). If this field has a value, the regularly calculated price from GetPrice() will be ignored and this value will be used as the object's price instead.
[DataMember(EmitDefaultValue = false)]
public float? CustomPrice
Field Value
FromStorage
This value is true if this clothes item is from the ClothesStorage
[DataMember]
public bool FromStorage
Field Value
Type
The Clothes type that these worn clothes reference
[DataMember]
public readonly Clothes Type
Field Value
Methods
GetPrice()
Returns this clothing item's price, which is either the CustomPrice or the underlying Clothes type's Price.
public float GetPrice()
Returns
- float
This clothing item's price.
Validate()
This method is called when this object is loaded from disk.
public bool Validate()
Returns
- bool
false if the object is not valid, true otherwise