Skip to content

Commit 8e546ca

Browse files
committed
refactor: Update naming from main.
1 parent bc24dc1 commit 8e546ca

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Runtime/Gamelogic/VisualScriptingEventNames.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static class VisualScriptingEventNames
2222
public const string LampEvent = "LampEvent";
2323
public const string SwitchEvent = "SwitchEvent";
2424
public const string CoilEvent = "CoilEvent";
25-
public const string DisplayEvent = "DisplayEvent";
25+
public const string DisplayChangedEvent = "DisplayChangedEvent";
2626
public const string CurrentPlayerChanged = "CurrentPlayerChanged";
2727
public const string PlayerVariableChanged = "PlayerVariableChanged";
2828
public const string TableVariableChanged = "TableVariableChanged";

Runtime/Gamelogic/VisualScriptingGamelogicEngine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ public void SetLamp(string id, float value, bool isCoil = false, LampSource sour
186186
OnLampChanged?.Invoke(this, new LampEventArgs(id, value, isCoil, source));
187187
}
188188

189-
public void SetDisplay(DisplayFrameData data)
189+
public void DisplayChanged(DisplayFrameData data)
190190
{
191-
EventBus.Trigger(VisualScriptingEventNames.DisplayEvent, new DisplayEventArgs(data));
191+
EventBus.Trigger(VisualScriptingEventNames.DisplayChangedEvent, new DisplayChangedEventArgs(data));
192192
}
193193

194194
public LampState GetLamp(string id)

Runtime/Nodes/Display/DisplayEventUnit.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace VisualPinball.Unity.VisualScripting
2626
[UnitTitle("On Display Changed")]
2727
[UnitSurtitle("Gamelogic Engine")]
2828
[UnitCategory("Events\\Visual Pinball")]
29-
public class DisplayEventUnit : GleEventUnit<DisplayEventArgs>
29+
public class DisplayEventUnit : GleEventUnit<DisplayChangedEventArgs>
3030
{
3131
[Serialize]
3232
[Inspectable]
@@ -44,7 +44,7 @@ public class DisplayEventUnit : GleEventUnit<DisplayEventArgs>
4444
[DoNotSerialize]
4545
protected override bool register => true;
4646

47-
public override EventHook GetHook(GraphReference reference) => new EventHook(VisualScriptingEventNames.DisplayEvent);
47+
public override EventHook GetHook(GraphReference reference) => new(VisualScriptingEventNames.DisplayChangedEvent);
4848

4949
protected override void Definition()
5050
{
@@ -61,12 +61,12 @@ protected override void Definition()
6161
}
6262
}
6363

64-
protected override bool ShouldTrigger(Flow flow, DisplayEventArgs args)
64+
protected override bool ShouldTrigger(Flow flow, DisplayChangedEventArgs args)
6565
{
6666
return Display != null && Display.Id.Equals(args.DisplayFrameData.Id);
6767
}
6868

69-
protected override void AssignArguments(Flow flow, DisplayEventArgs args)
69+
protected override void AssignArguments(Flow flow, DisplayChangedEventArgs args)
7070
{
7171
if (Display.Supports(DisplayFrameFormat.Numeric)) {
7272
if (args.DisplayFrameData.Format == DisplayFrameFormat.Numeric) {

0 commit comments

Comments
 (0)