Skip to content

Commit a9ddfaa

Browse files
committed
wires: Add (dynamic) wires to game configuration.
1 parent 13ee7d6 commit a9ddfaa

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

VisualPinball.Engine.PinMAME.Unity/Runtime/PinMameGamelogicEngine.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public GamelogicEngineLamp[] AvailableLamps {
6666
}
6767
}
6868

69+
public GamelogicEngineWire[] AvailableWires => _game?.AvailableWires ?? Array.Empty<GamelogicEngineWire>();
70+
6971
public event EventHandler<CoilEventArgs> OnCoilChanged;
7072
public event EventHandler<LampEventArgs> OnLampChanged;
7173
public event EventHandler<LampsEventArgs> OnLampsChanged;

VisualPinball.Engine.PinMAME/PinMameGame.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ public abstract class PinMameGame
7575

7676
public abstract GamelogicEngineLamp[] AvailableLamps { get; }
7777

78+
public GamelogicEngineWire[] AvailableWires { get; } = {
79+
new GamelogicEngineWire(SwFlipperLowerLeft, CoilFlipperLowerLeft, DestinationType.Coil, "Lower Left Flipper"),
80+
new GamelogicEngineWire(SwFlipperLowerRight, CoilFlipperLowerRight, DestinationType.Coil, "Lower Right Flipper"),
81+
new GamelogicEngineWire(SwFlipperUpperLeft, CoilFlipperUpperLeft, DestinationType.Coil, "Upper Left Flipper"),
82+
new GamelogicEngineWire(SwFlipperUpperRight, CoilFlipperUpperRight, DestinationType.Coil, "Upper Right Flipper"),
83+
};
84+
7885
/// <summary>
7986
/// These coils are common to all games.
8087
/// </summary>

0 commit comments

Comments
 (0)