2 using System.Collections.Generic;
7 using System.Xml.Serialization;
37 foreach (KeyValuePair<int, AnalogAlpha> KV
in Layers)
39 int Alpha = KV.Value.Alpha;
42 Value = AlphaMappingTable.AlphaMapping[255 - Alpha, (int)Value] + AlphaMappingTable.AlphaMapping[Alpha, KV.Value.Value];
67 public string OutputName {
get; set; }
73 private string _FadingCurveName =
"Linear";
75 protected Curve FadingCurve = null;
84 public string FadingCurveName
86 get {
return _FadingCurveName; }
87 set { _FadingCurveName = value; }
94 FadingCurve = Cabinet.
Curves[FadingCurveName];
96 else if (!FadingCurveName.IsNullOrWhiteSpace())
101 Enum.TryParse(FadingCurveName, out T);
102 FadingCurve =
new Curve(T);
107 Cabinet.
Curves.Add(FadingCurveName);
128 public override void Init(Cabinet Cabinet)
130 this.Cabinet = Cabinet;
131 InitOutputs(Cabinet);
132 InitFadingCurve(Cabinet);
135 private void InitOutputs(Cabinet Cabinet)
139 Output = Cabinet.
Outputs[OutputName];
The Cabinet object describes the parts of a pinball cabinet (toys, outputcontrollers, outputs and more).
CurveList Curves
List of named curve objects used to set Curves for toys.
Dictionary for RGBALayer objects.
Common interface for toys supporting analog alpha layers.
bool Contains(string Name)
Checks if a INamedItem object with the specified name exists in the list.
bool Contains(IOutput Output)
Checks if the specified IOutput exists in the list.
CabinetOutputList Outputs
List of IOutput objects representing all outputs of all all output controllers in the cabinet...
byte Value
Value of the output.
override void Reset()
Resets the toy. Clears the Layers object and turn off the output (if available). Method must be over...
AnalogAlphaToy()
Initializes a new instance of the AnalogAlphaToy class.
byte MapValue(byte CurvePosition)
Returns the value from the specified curve position.
override void Init(Cabinet Cabinet)
Initializes the toy.
The namespace DirectOutput.Cab contains all cabinet related classes like the Cabinet class itself...
void Finish()
Finishes the cabinet
DirectOutput.Cab.Out is the namespace for all output controller related classes like different output...
override void Finish()
Resets the toy and releases all references
Common interface for outputs of any output controller. The Output class implements this interface and...
This toy handles analog values (0-255) in a layer structure including alpha value (0=completely trans...
override void UpdateOutputs()
Updates the output of the toy.
Base class for toys which need update calls to update the state of their assigned outputs...
CurveTypeEnum
Enumeration of predefined curves.
Represents a curve which can be used to map values (e.g. adjust a brighnetss value of a led to the br...
int GetResultingValue()
Gets the analog value which results from the analog values and alpha values in the dirctionary...
The namespace DirectOutput.General contains classes for general use.