Class NamedColorSet
Set of named colors.
Inheritance
System.Object
NamedColorSet
Inherited Members
Namespace: InsaneScatterbrain.MapGraph
Syntax
public class NamedColorSet : DataSetScriptableObject<NamedColor>, IVersioned, IDataSet<NamedColor>, IDataSet
Properties
OpenSet
Declaration
protected override IOpenDataSet<NamedColor> OpenSet { get; }
Property Value
Type | Description |
---|---|
IOpenDataSet<NamedColor> |
Overrides
InsaneScatterbrain.ScriptGraph.DataSetScriptableObject<InsaneScatterbrain.MapGraph.NamedColor, InsaneScatterbrain.ScriptGraph.IOpenDataSet<InsaneScatterbrain.MapGraph.NamedColor>>.OpenSet
Methods
Add(NamedColor)
Declaration
public override void Add(NamedColor element)
Parameters
Type | Name | Description |
---|---|---|
NamedColor | element |
Overrides
InsaneScatterbrain.ScriptGraph.DataSetScriptableObject<InsaneScatterbrain.MapGraph.NamedColor, InsaneScatterbrain.ScriptGraph.IOpenDataSet<InsaneScatterbrain.MapGraph.NamedColor>>.Add(InsaneScatterbrain.MapGraph.NamedColor)
ContainsColor(Color32)
Gets whether or not the color is defined inside the set.
Declaration
public bool ContainsColor(Color32 color)
Parameters
Type | Name | Description |
---|---|---|
Color32 | color | The color. |
Returns
Type | Description |
---|---|
System.Boolean | True if the color exists inside the set, false otherwise. |
GetColorById(String)
Gets the color by ID.
Declaration
public Color32 GetColorById(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The named color's ID. |
Returns
Type | Description |
---|---|
Color32 | The color. |
GetColorByName(String)
Gets the color by name.
Declaration
public Color32 GetColorByName(string colorName)
Parameters
Type | Name | Description |
---|---|---|
System.String | colorName | The named color's name. |
Returns
Type | Description |
---|---|
Color32 | The color. |
GetId(String)
Declaration
public string GetId(string colorName)
Parameters
Type | Name | Description |
---|---|---|
System.String | colorName |
Returns
Type | Description |
---|---|
System.String |
GetName(Color32)
Gets the color name by color.
Declaration
public string GetName(Color32 color)
Parameters
Type | Name | Description |
---|---|---|
Color32 | color | The color. |
Returns
Type | Description |
---|---|
System.String | The color name. |
OnAfterDeserialize()
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Declaration
public void OnBeforeSerialize()
Remove(String)
Removes the color with the given name from the set.
Declaration
public override void Remove(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The ID of the named color to remove. |
Overrides
InsaneScatterbrain.ScriptGraph.DataSetScriptableObject<InsaneScatterbrain.MapGraph.NamedColor, InsaneScatterbrain.ScriptGraph.IOpenDataSet<InsaneScatterbrain.MapGraph.NamedColor>>.Remove(System.String)
SetColor(String, Color)
Declaration
public void SetColor(string id, Color newColor)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | |
Color | newColor |
Implements
ISerializationCallbackReceiver