WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
MatrixValueEffectBase.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
7 
8 namespace DirectOutput.FX.MatrixFX
9 {
13  public abstract class MatrixValueEffectBase<MatrixElementType> : MatrixEffectBase<MatrixElementType>
14  {
15 
20  public override void Trigger(Table.TableElementData TableElementData)
21  {
22  if (MatrixLayer != null)
23  {
24 
25  int V = TableElementData.Value.Limit(0, 255);
26  if (V > 0 && FadeMode == FadeModeEnum.OnOff) { V = 255; }
27 
28  MatrixElementType D = GetEffectValue(V);
29 
30 
31  for (int x = AreaLeft; x <= AreaRight; x++)
32  {
33  for (int y = AreaTop; y <= AreaBottom; y++)
34  {
35  MatrixLayer[x, y] = D;
36  }
37  }
38  }
39  }
40 
41 
48  protected abstract MatrixElementType GetEffectValue(int TriggerValue);
49 
50 
51 
52 
53 
54  }
55 }
The namespace DirectOutput.Cab.Toys contains all toy related classes.
Base class for effects targeting a matrix of toys (e.g. addressable ledstrip)
Base class for effects setting all elements a specified area of a matrix toy to the same specific val...
The namespace DirectOutput.Cab contains all cabinet related classes like the Cabinet class itself...
Definition: Cab.cs:16
override void Trigger(Table.TableElementData TableElementData)
Triggers the effect with the given TableElementData.
FadeModeEnum
Defines the fading behaviour.
Definition: FadeModeEnum.cs:11
Namespace for objects dealing with layers
The namespace DirectOutput.General contains classes for general use.