Class Customizer
Used to do appearance and equipment customizations of the character.
Inheritance
Namespace: CustomizableCharacters
Assembly: cs.temp.dll.dll
Syntax
public class Customizer : MonoBehaviour
Properties
BodyColor
Used to do appearance and equipment customizations of the character.
Declaration
public Color BodyColor { get; }
Property Value
Type | Description |
---|---|
Color |
Customizations
Used to do appearance and equipment customizations of the character.
Declaration
public ReadOnlyCollection<Customization> Customizations { get; }
Property Value
Type | Description |
---|---|
Read |
IsAllCustomizationHidden
Used to do appearance and equipment customizations of the character.
Declaration
public bool IsAllCustomizationHidden { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Add(Customization)
Adds and displays a customization. Note that any current customization in the same category will be removed.
Declaration
public void Add(Customization customization)
Parameters
Type | Name | Description |
---|---|---|
Customization | customization |
Add(CustomizationData)
Creates, adds and displays a customization from data. Note that any current customization in the same category will be removed.
Declaration
public void Add(CustomizationData data)
Parameters
Type | Name | Description |
---|---|---|
Customization |
data | The data that will be used to create the customization |
ApplySet(CustomizationSet)
Adds all Customizations from a CustomizationSet. Note that new customizations will be created and the ones on the set will not be referenced.
Declaration
public void ApplySet(CustomizationSet set)
Parameters
Type | Name | Description |
---|---|---|
Customization |
set |
Contains(Customization)
Returns whether customization is added or not.
Declaration
public bool Contains(Customization customization)
Parameters
Type | Name | Description |
---|---|---|
Customization | customization |
Returns
Type | Description |
---|---|
Boolean |
Contains(CustomizationData)
Returns whether any customization created from a specific CustomizationData exists or not.
Declaration
public bool Contains(CustomizationData data)
Parameters
Type | Name | Description |
---|---|---|
Customization |
data |
Returns
Type | Description |
---|---|
Boolean |
GetCustomizationDataInCategory(CustomizationCategory)
Returns, if exists, a CustomizationData from a category.
Declaration
public CustomizationData GetCustomizationDataInCategory(CustomizationCategory category)
Parameters
Type | Name | Description |
---|---|---|
Customization |
category |
Returns
Type | Description |
---|---|
Customization |
GetCustomizationDetailColor(CustomizationData)
Gets the detail color from a customization created from a certain CustomizationData.
Declaration
public Color GetCustomizationDetailColor(CustomizationData data)
Parameters
Type | Name | Description |
---|---|---|
Customization |
data |
Returns
Type | Description |
---|---|
Color |
GetCustomizationDetailSpritesIndex(CustomizationData)
Gets the detail sprite index from a customizatiom created from a certain CustomizationData.
Declaration
public int GetCustomizationDetailSpritesIndex(CustomizationData data)
Parameters
Type | Name | Description |
---|---|---|
Customization |
data |
Returns
Type | Description |
---|---|
Int32 |
GetCustomizationMainColor(CustomizationData)
Gets the main color from a customization created from a certain CustomizationData.
Declaration
public Color GetCustomizationMainColor(CustomizationData data)
Parameters
Type | Name | Description |
---|---|---|
Customization |
data |
Returns
Type | Description |
---|---|
Color |
GetCustomizationWithData(CustomizationData)
Gets a customization that was created from a certain CustomizationData.
Declaration
public Customization GetCustomizationWithData(CustomizationData data)
Parameters
Type | Name | Description |
---|---|---|
Customization |
data |
Returns
Type | Description |
---|---|
Customization |
HasCustomizationInCategory(CustomizationCategory)
Returns whether there is any customization existing in a category or not.
Declaration
public bool HasCustomizationInCategory(CustomizationCategory category)
Parameters
Type | Name | Description |
---|---|---|
Customization |
category |
Returns
Type | Description |
---|---|
Boolean |
HideAll()
Hides all customization that can be hidden. Note that this only visually hides the sprites, the customization will still exist.
Declaration
public void HideAll()
HideCategory(CustomizationCategory)
Hides the customization in a category.
Declaration
public void HideCategory(CustomizationCategory category)
Parameters
Type | Name | Description |
---|---|---|
Customization |
category |
HideLocation(CustomizationLocation)
Hides all slots with a location.
Declaration
public void HideLocation(CustomizationLocation location)
Parameters
Type | Name | Description |
---|---|---|
Customization |
location |
Refresh()
Refreshes the whole class.
Declaration
public void Refresh()
Remove(Customization)
Removes and hides a customization.
Declaration
public void Remove(Customization customization)
Parameters
Type | Name | Description |
---|---|---|
Customization | customization | The data that was used to create the customization |
Remove(CustomizationData)
Removes and hides a customization.
Declaration
public void Remove(CustomizationData data)
Parameters
Type | Name | Description |
---|---|---|
Customization |
data | The data that was used to create the customization |
RemoveAll()
Hides and removes all customization that can be hidden.
Declaration
public void RemoveAll()
RemoveAllInCategory(CustomizationCategory)
Hides and removes all customization that can be hidden in a category.
Declaration
public void RemoveAllInCategory(CustomizationCategory category)
Parameters
Type | Name | Description |
---|---|---|
Customization |
category |
RemoveSet(CustomizationSet)
Removes all Customizations which has data matching a CustomizationSet.
Declaration
public void RemoveSet(CustomizationSet set)
Parameters
Type | Name | Description |
---|---|---|
Customization |
set |
SetBodyColor(Color)
Changes the color of all the body parts.
Declaration
public void SetBodyColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color |
SetCustomizationDetailColor(CustomizationData, Color)
Sets the detail color of a customization created from a certain CustomizationData.
Declaration
public void SetCustomizationDetailColor(CustomizationData data, Color color)
Parameters
Type | Name | Description |
---|---|---|
Customization |
data | |
Color | color |
SetCustomizationDetailIndex(CustomizationData, Int32)
Sets the detail sprite index on a customization created from a certain CustomizationData.
Declaration
public void SetCustomizationDetailIndex(CustomizationData data, int index)
Parameters
Type | Name | Description |
---|---|---|
Customization |
data | |
Int32 | index |
SetCustomizationMainColor(CustomizationData, Color)
Sets the main color of a customization created from a certain CustomizationData.
Declaration
public void SetCustomizationMainColor(CustomizationData data, Color color)
Parameters
Type | Name | Description |
---|---|---|
Customization |
data | |
Color | color |
ShowAll()
Shows all customization.
Declaration
public void ShowAll()
ShowCategory(CustomizationCategory)
Shows the customization in a category.
Declaration
public void ShowCategory(CustomizationCategory category)
Parameters
Type | Name | Description |
---|---|---|
Customization |
category |
ShowLocation(CustomizationLocation)
Shows all slots with a location.
Declaration
public void ShowLocation(CustomizationLocation location)
Parameters
Type | Name | Description |
---|---|---|
Customization |
location |
Events
AddedCustomization
Used to do appearance and equipment customizations of the character.
Declaration
public event Action<Customization> AddedCustomization
Event Type
Type | Description |
---|---|
Action<Customization> |
RemovedCustomization
Used to do appearance and equipment customizations of the character.
Declaration
public event Action<Customization> RemovedCustomization
Event Type
Type | Description |
---|---|
Action<Customization> |