DirectOutputR1
DirectOutput framework R1 for virtual pinball cabinets.
Go to:
Overview 
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
EffectEffectBase.cs
Go to the documentation of this file.
1 using System.Xml.Serialization;
2 
3 namespace DirectOutput.FX
4 {
8  public abstract class EffectEffectBase: EffectBase
9  {
10  #region EffectName
11  private string _TargetEffectName;
16  public string TargetEffectName
17  {
18  get { return _TargetEffectName; }
19  set
20  {
21  if (_TargetEffectName != value)
22  {
23  _TargetEffectName = value;
24  TargetEffect = null;
25 
26  }
27  }
28  }
29 
30 
31 
32 
33  #endregion
34 
35 
36 
37  #region Effect
38  private IEffect _TargetEffect;
43  [XmlIgnoreAttribute]
44  public IEffect TargetEffect
45  {
46  get
47  {
48  return _TargetEffect;
49  }
50  protected set
51  {
52  _TargetEffect = value;
53  }
54  }
55 
56  private void ResolveEffectName(Table.Table Table)
57  {
58  if (!TargetEffectName.IsNullOrWhiteSpace() && Table.Effects.Contains(TargetEffectName))
59  {
60  TargetEffect = Table.Effects[TargetEffectName];
61  };
62 
63  }
64 
65  #endregion
66 
67  protected Table.Table Table;
68 
74  public override void Init(Table.Table Table)
75  {
76  this.Table = Table;
77  ResolveEffectName(Table);
78  }
79 
84  public override void Finish()
85  {
86  TargetEffect = null;
87  Table = null;
88  base.Finish();
89  }
90 
91  }
92 }