2 using System.Collections.Generic;
28 get {
return _ActiveColor; }
29 set { _ActiveColor = value; }
43 get {
return _InactiveColor; }
44 set { _InactiveColor = value; }
58 get {
return _FadeMode; }
59 set { _FadeMode = value; }
67 public override void Trigger(Table.TableElementData TableElementData)
71 int FadeValue = TableElementData.Value;
72 if (FadeMode ==
FadeModeEnum.OnOff && FadeValue > 0) { FadeValue = 255; }
74 Layer.Red = InactiveColor.Red + (int)((
float)(ActiveColor.Red - InactiveColor.Red) * FadeValue / 255).Limit(0, 255);
75 Layer.Green = InactiveColor.Green + (int)((
float)(ActiveColor.Green - InactiveColor.Green) * FadeValue / 255).Limit(0, 255);
76 Layer.Blue = InactiveColor.Blue + (int)((
float)(ActiveColor.Blue - InactiveColor.Blue) * FadeValue / 255).Limit(0, 255);
77 Layer.Alpha = InactiveColor.Alpha + (int)((
float)(ActiveColor.Alpha - InactiveColor.Alpha) * FadeValue / 255).Limit(0, 255);
88 public override void Init(Table.Table Table)
override void Trigger(Table.TableElementData TableElementData)
Triggers the effect with the given TableElementData.
This class stores information on colors used for toys and effects (e.g. RGBLed).
The effects sets the color of a RGBAToy based on the trigger value.
Base class for effects using RGBA toys
FadeModeEnum
Defines the fading behaviour.
override void Finish()
Finishes the effect.
The namespace DirectOutput.General contains classes for general use.
override void Init(Table.Table Table)
Initializes the effect. Resolves the name of the RGBA toy.