Class ColorMixer
Logic container for color mixing Implements basic blending of coloros based on weights
Inheritance
System.Object
ColorMixer
Namespace: Eco.Shared.Graphics
Assembly: Eco.Shared.dll
Syntax
public class ColorMixer : Object
Constructors
ColorMixer()
Declaration
public ColorMixer()
Fields
PaintBucketCountForConsumptionIncrease
Multiplier for paint mixing. Applies to colorant consumption, based on amount of buckets put in slot.
Declaration
public static int PaintBucketCountForConsumptionIncrease
Field Value
Type | Description |
---|---|
System.Int32 |
PossibleColorants
Holds possible colorants data for mixing. Name, color and item link
Declaration
public static ColorantData[] PossibleColorants
Field Value
Type | Description |
---|---|
ColorantData[] |
Methods
GetColorantData(ColorantWeight)
Gets colorant data, based on a ColorRecipe ingredient
Declaration
public static ColorantData GetColorantData(ColorantWeight ingredient)
Parameters
Type | Name | Description |
---|---|---|
ColorantWeight | ingredient |
Returns
Type | Description |
---|---|
ColorantData |
MixColors(ColorRecipe)
Get final color from recipe. Approach is based on colorant weights,that is calculated towards total weight amount.
Declaration
public static ByteColor MixColors(ColorRecipe recipe)
Parameters
Type | Name | Description |
---|---|---|
ColorRecipe | recipe |
Returns
Type | Description |
---|---|
ByteColor |