2 using System.Collections.Generic;
5 using DirectOutput.Cab.Toys.Layer;
6 using DirectOutput.General.Analog;
8 namespace DirectOutput.FX.AnalogToyFX
28 get {
return _ActiveValue; }
29 set { _ActiveValue = value; }
42 get {
return _InactiveValue; }
43 set { _InactiveValue = value; }
57 get {
return _FadeMode; }
58 set { _FadeMode = value; }
66 public override void Trigger(Table.TableElementData TableElementData)
70 int FadeValue = TableElementData.
Value;
71 if (FadeMode ==
FadeModeEnum.OnOff && FadeValue > 0) { FadeValue = 255; }
73 Layer.Value = InactiveValue.Value + (int)((
float)(ActiveValue.Value - InactiveValue.Value) * FadeValue / 255).Limit(0, 255);
74 Layer.Alpha = InactiveValue.Alpha + (int)((
float)(ActiveValue.Alpha - InactiveValue.Alpha) * FadeValue / 255).Limit(0, 255);
84 public override void Init(Table.Table Table)
92 public override void Finish()