2 using System.Collections.Generic;
5 using DirectOutput.General.Color;
6 using DirectOutput.Cab.Toys.Layer;
8 namespace DirectOutput.FX.MatrixFX
13 public abstract class MatrixValueEffectBase<MatrixElementType> : MatrixEffectBase<MatrixElementType>
20 public override void Trigger(Table.TableElementData TableElementData)
22 if (MatrixLayer != null)
25 int V = TableElementData.Value.Limit(0, 255);
26 if (V > 0 && FadeMode ==
FadeModeEnum.OnOff) { V = 255; }
28 MatrixElementType D = GetEffectValue(V);
31 for (
int x = AreaLeft; x <= AreaRight; x++)
33 for (
int y = AreaTop; y <= AreaBottom; y++)
35 MatrixLayer[x, y] = D;
48 protected abstract MatrixElementType GetEffectValue(
int TriggerValue);