Show / Hide Table of Contents

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

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾