From d7813edfcef7951783557f9e0680e3536be147de Mon Sep 17 00:00:00 2001
From: arthurkehrwald <50906979+arthurkehrwald@users.noreply.github.com>
Date: Tue, 8 Oct 2024 21:15:13 +0200
Subject: [PATCH] Turn into package and delete playmaker integration
---
Assets.meta | 8 +
Assets/BCP.meta | 8 +
.../Scripts/PlayMaker/GetBCPAttractStart.cs | 70 ----
.../Scripts/PlayMaker/GetBCPAttractStop.cs | 63 ----
Assets/BCP/Scripts/PlayMaker/GetBCPBallEnd.cs | 53 ---
.../BCP/Scripts/PlayMaker/GetBCPBallStart.cs | 68 ----
Assets/BCP/Scripts/PlayMaker/GetBCPGameEnd.cs | 63 ----
.../BCP/Scripts/PlayMaker/GetBCPGameStart.cs | 72 ----
Assets/BCP/Scripts/PlayMaker/GetBCPGoodbye.cs | 53 ---
Assets/BCP/Scripts/PlayMaker/GetBCPHello.cs | 77 ----
.../PlayMaker/GetBCPHighScoreAwardDisplay.cs | 99 ------
.../PlayMaker/GetBCPHighScoreEnterInitials.cs | 334 ------------------
.../PlayMaker/GetBCPHighScoreNotification.cs | 99 ------
.../PlayMaker/GetBCPMachineVariable.cs | 70 ----
.../PlayMaker/GetBCPMachineVariableChange.cs | 94 -----
.../PlayMaker/GetBCPMachineVariableString.cs | 51 ---
.../BCP/Scripts/PlayMaker/GetBCPModeStart.cs | 71 ----
.../BCP/Scripts/PlayMaker/GetBCPModeStop.cs | 62 ----
.../Scripts/PlayMaker/GetBCPPlayerAdded.cs | 61 ----
.../Scripts/PlayMaker/GetBCPPlayerScore.cs | 76 ----
.../PlayMaker/GetBCPPlayerTurnStart.cs | 60 ----
.../Scripts/PlayMaker/GetBCPPlayerVariable.cs | 75 ----
.../PlayMaker/GetBCPPlayerVariableChange.cs | 97 -----
.../GetBCPPlayerVariableChangeBool.cs | 97 -----
.../GetBCPPlayerVariableChangeFloat.cs | 97 -----
.../GetBCPPlayerVariableChangeInt.cs | 97 -----
.../GetBCPPlayerVariableCurrentPlayer.cs | 70 ----
Assets/BCP/Scripts/PlayMaker/GetBCPReset.cs | 61 ----
Assets/BCP/Scripts/PlayMaker/GetBCPSetting.cs | 69 ----
.../BCP/Scripts/PlayMaker/GetBCPSlamTilt.cs | 53 ---
.../Scripts/PlayMaker/GetBCPSwitchActive.cs | 61 ----
.../Scripts/PlayMaker/GetBCPSwitchInactive.cs | 61 ----
Assets/BCP/Scripts/PlayMaker/GetBCPTilt.cs | 53 ---
.../Scripts/PlayMaker/GetBCPTiltWarning.cs | 69 ----
Assets/BCP/Scripts/PlayMaker/GetBCPTimer.cs | 77 ----
.../Scripts/PlayMaker/GetBCPTimerComplete.cs | 70 ----
.../Scripts/PlayMaker/GetBCPTimerPaused.cs | 70 ----
.../Scripts/PlayMaker/GetBCPTimerStarted.cs | 70 ----
.../Scripts/PlayMaker/GetBCPTimerStopped.cs | 70 ----
.../BCP/Scripts/PlayMaker/GetBCPTimerTick.cs | 70 ----
.../Scripts/PlayMaker/GetBCPTimerTimeAdded.cs | 84 -----
.../PlayMaker/GetBCPTimerTimeSubtracted.cs | 84 -----
Assets/BCP/Scripts/PlayMaker/GetBCPTrigger.cs | 79 -----
.../SendBCPInputHighScoreComplete.cs | 39 --
.../PlayMaker/SendBCPSetMachineVariable.cs | 47 ---
Assets/BCP/Scripts/PlayMaker/SendBCPSwitch.cs | 43 ---
.../BCP/Scripts/PlayMaker/SendBCPTrigger.cs | 37 --
.../Scripts/PlayMaker/ShutdownBCPServer.cs | 32 --
...) Server for Unity - Developer's Guide.pdf | Bin
LICENSE.md.meta | 7 +
README.md.meta | 7 +
Runtime.meta | 8 +
Runtime/Prefabs.meta | 8 +
.../BCP => Runtime}/Prefabs/BCP Server.prefab | 9 +-
Runtime/Prefabs/BCP Server.prefab.meta | 7 +
Runtime/Scripts.meta | 8 +
{Assets/BCP => Runtime}/Scripts/BcpLogger.cs | 0
Runtime/Scripts/BcpLogger.cs.meta | 11 +
{Assets/BCP => Runtime}/Scripts/BcpMessage.cs | 0
Runtime/Scripts/BcpMessage.cs.meta | 11 +
.../Scripts/BcpMessageManager.cs | 0
Runtime/Scripts/BcpMessageManager.cs.meta | 11 +
{Assets/BCP => Runtime}/Scripts/BcpServer.cs | 0
Runtime/Scripts/BcpServer.cs.meta | 11 +
{Assets/BCP => Runtime}/Scripts/SimpleJSON.cs | 0
Runtime/Scripts/SimpleJSON.cs.meta | 11 +
...org.missionpinball.unity-bcp-server.asmdef | 14 +
...issionpinball.unity-bcp-server.asmdef.meta | 7 +
Tests.meta | 8 +
Tests/Editor.meta | 8 +
.../Tests => Tests}/Editor/BcpMessageTests.cs | 0
Tests/Editor/BcpMessageTests.cs.meta | 11 +
...nball.unity-bcp-server.Editor.Tests.asmdef | 19 +
....unity-bcp-server.Editor.Tests.asmdef.meta | 7 +
package.json | 8 +
package.json.meta | 7 +
76 files changed, 210 insertions(+), 3432 deletions(-)
create mode 100644 Assets.meta
create mode 100644 Assets/BCP.meta
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPAttractStart.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPAttractStop.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPBallEnd.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPBallStart.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPGameEnd.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPGameStart.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPGoodbye.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPHello.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreAwardDisplay.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreEnterInitials.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreNotification.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariable.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariableChange.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariableString.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPModeStart.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPModeStop.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPPlayerAdded.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPPlayerScore.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPPlayerTurnStart.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariable.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChange.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeBool.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeFloat.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeInt.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableCurrentPlayer.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPReset.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPSetting.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPSlamTilt.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPSwitchActive.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPSwitchInactive.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTilt.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTiltWarning.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTimer.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTimerComplete.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTimerPaused.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTimerStarted.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTimerStopped.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTimerTick.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTimerTimeAdded.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTimerTimeSubtracted.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/GetBCPTrigger.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/SendBCPInputHighScoreComplete.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/SendBCPSetMachineVariable.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/SendBCPSwitch.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/SendBCPTrigger.cs
delete mode 100644 Assets/BCP/Scripts/PlayMaker/ShutdownBCPServer.cs
rename {Assets/BCP/Docs => Documentation~}/Backbox Communication Protocol (BCP) Server for Unity - Developer's Guide.pdf (100%)
create mode 100644 LICENSE.md.meta
create mode 100644 README.md.meta
create mode 100644 Runtime.meta
create mode 100644 Runtime/Prefabs.meta
rename {Assets/BCP => Runtime}/Prefabs/BCP Server.prefab (87%)
create mode 100644 Runtime/Prefabs/BCP Server.prefab.meta
create mode 100644 Runtime/Scripts.meta
rename {Assets/BCP => Runtime}/Scripts/BcpLogger.cs (100%)
create mode 100644 Runtime/Scripts/BcpLogger.cs.meta
rename {Assets/BCP => Runtime}/Scripts/BcpMessage.cs (100%)
create mode 100644 Runtime/Scripts/BcpMessage.cs.meta
rename {Assets/BCP => Runtime}/Scripts/BcpMessageManager.cs (100%)
create mode 100644 Runtime/Scripts/BcpMessageManager.cs.meta
rename {Assets/BCP => Runtime}/Scripts/BcpServer.cs (100%)
create mode 100644 Runtime/Scripts/BcpServer.cs.meta
rename {Assets/BCP => Runtime}/Scripts/SimpleJSON.cs (100%)
create mode 100644 Runtime/Scripts/SimpleJSON.cs.meta
create mode 100644 Runtime/org.missionpinball.unity-bcp-server.asmdef
create mode 100644 Runtime/org.missionpinball.unity-bcp-server.asmdef.meta
create mode 100644 Tests.meta
create mode 100644 Tests/Editor.meta
rename {Assets/BCP/Scripts/Tests => Tests}/Editor/BcpMessageTests.cs (100%)
create mode 100644 Tests/Editor/BcpMessageTests.cs.meta
create mode 100644 Tests/Editor/org.missionpinball.unity-bcp-server.Editor.Tests.asmdef
create mode 100644 Tests/Editor/org.missionpinball.unity-bcp-server.Editor.Tests.asmdef.meta
create mode 100644 package.json
create mode 100644 package.json.meta
diff --git a/Assets.meta b/Assets.meta
new file mode 100644
index 0000000..34ca67d
--- /dev/null
+++ b/Assets.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4a8c824aad2d03a4d8e4f285d8fbb19a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BCP.meta b/Assets/BCP.meta
new file mode 100644
index 0000000..efbf02a
--- /dev/null
+++ b/Assets/BCP.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ab3bfcf54181c5a498a01db474059591
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPAttractStart.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPAttractStart.cs
deleted file mode 100644
index bc9ca79..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPAttractStart.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF attract 'mode_start' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'mode_start' attract command is received.")]
-public class GetBCPAttractStart : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF attract mode to listen for")]
- public string modeName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The optional variable to receive the value of the priority for the specified mode")]
- public FsmInt priority;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF attract 'mode_start' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- modeName = "attract";
- priority = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'mode_start' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnModeStart += ModeStart;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'mode_start' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnModeStart -= ModeStart;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a mode is started.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void ModeStart(object sender, ModeStartMessageEventArgs e)
- {
- // Determine if this mode message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(modeName) && e.Name == modeName)
- {
- if (!priority.IsNone)
- priority.Value = e.Priority;
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPAttractStop.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPAttractStop.cs
deleted file mode 100644
index 20f38dd..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPAttractStop.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF attract 'mode_stop' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF attract 'mode_stop' command is received.")]
-public class GetBCPAttractStop : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF attract mode to listen for")]
- public string modeName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF attract 'mode_stop' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- modeName = "attract";
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'mode_stop' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnModeStop += ModeStop;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'mode_stop' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnModeStop -= ModeStop;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a mode stops.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void ModeStop(object sender, ModeStopMessageEventArgs e)
- {
- // Determine if this mode message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(modeName) && e.Name == modeName)
- Fsm.Event(sendEvent);
-
- }
-
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPBallEnd.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPBallEnd.cs
deleted file mode 100644
index 1a0b5f4..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPBallEnd.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'ball_end' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'ball_end' command is received.")]
-public class GetBCPBallEnd : FsmStateAction
-{
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'ball_end' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'ball_end' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnBallEnd += BallEnd;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'ball_end' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnBallEnd -= BallEnd;
- base.OnExit();
- }
-
-
- ///
- /// Event handler called when a ball end event is received.
- ///
- /// The sender.
- public void BallEnd(object sender, BcpMessageEventArgs e)
- {
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPBallStart.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPBallStart.cs
deleted file mode 100644
index a80f066..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPBallStart.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'ball_start' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'ball_start' command is received.")]
-public class GetBCPBallStart : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the current player number for the newly started ball")]
- public FsmInt player;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the ball number for the newly started ball")]
- public FsmInt ball;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'ball_start' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- player = null;
- ball = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'ball_start' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnBallStart += BallStart;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'ball_start' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnBallStart -= BallStart;
- base.OnExit();
- }
-
-
- ///
- /// Event handler called when a ball start event is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void BallStart(object sender, BallStartMessageEventArgs e)
- {
- player.Value = e.PlayerNum;
- ball.Value = e.Ball;
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPGameEnd.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPGameEnd.cs
deleted file mode 100644
index 46b2438..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPGameEnd.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF game 'mode_end' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF game 'mode_end' command is received.")]
-public class GetBCPGameEnd : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF game mode to listen for")]
- public string modeName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF game 'mode_stop' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- modeName = "game";
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'mode_stop' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnModeStop += ModeStop;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'mode_stop' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnModeStop -= ModeStop;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a mode stops.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void ModeStop(object sender, ModeStopMessageEventArgs e)
- {
- // Determine if this mode message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(modeName) && e.Name == modeName)
- Fsm.Event(sendEvent);
-
- }
-
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPGameStart.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPGameStart.cs
deleted file mode 100644
index db81409..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPGameStart.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF game 'mode_start' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF game 'mode_start' command is received.")]
-public class GetBCPGameStart : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF game mode to listen for")]
- public string modeName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The optional variable to receive the value of the priority for the specified mode")]
- public FsmInt priority;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF game 'mode_start' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- modeName = "game";
- priority = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'mode_start' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnModeStart += ModeStart;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'mode_start' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnModeStart -= ModeStart;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a mode is started.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void ModeStart(object sender, ModeStartMessageEventArgs e)
- {
- // Determine if this mode message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(modeName) && e.Name == modeName)
- {
- if (!priority.IsNone)
- priority.Value = e.Priority;
-
- Fsm.Event(sendEvent);
- }
- }
-
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPGoodbye.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPGoodbye.cs
deleted file mode 100644
index f5f83b4..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPGoodbye.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'goodbye' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'goodbye' command is received.")]
-public class GetBCPGoodbye : FsmStateAction
-{
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'goodbye' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'goodbye' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnGoodbye += Goodbye;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'goodbye' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnGoodbye -= Goodbye;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a goodbye message is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Goodbye(object sender, BcpMessageEventArgs e)
- {
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPHello.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPHello.cs
deleted file mode 100644
index 34ccb42..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPHello.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'hello' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'hello' command is received.")]
-public class GetBCPHello : FsmStateAction
-{
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the version from the 'hello' command")]
- public FsmString version;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the controller name from the 'hello' command")]
- public FsmString controllerName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the controller version from the 'hello' command")]
- public FsmString controllerVersion;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'hello' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- version = null;
- controllerName = null;
- controllerVersion = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'hello' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnHello += Hello;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'hello' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnHello -= Hello;
- base.OnExit();
- }
-
- ///
- /// Event handler called when receiving a BCP 'hello' command.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Hello(object sender, HelloMessageEventArgs e)
- {
- if (!version.IsNone)
- version.Value = e.Version;
-
- if (!controllerName.IsNone)
- controllerName.Value = e.ControllerName;
-
- if (!controllerVersion.IsNone)
- controllerVersion.Value = e.ControllerVersion;
-
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreAwardDisplay.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreAwardDisplay.cs
deleted file mode 100644
index 2d018bb..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreAwardDisplay.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when a high_score_award_display BCP Trigger
-/// command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when the special BCP Trigger high_score_award_display command is received.")]
-public class GetBCPHighScoreAwardDisplay : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the award label value")]
- public FsmString award;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the player name/initials")]
- public FsmString playerName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the high score value")]
- public FsmInt value;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when the high_score_award_display BCP Trigger is received")]
- public FsmEvent sendEvent;
-
- private bool registered;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- base.Reset();
- award = null;
- playerName = null;
- value = null;
- sendEvent = null;
- registered = false;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP Trigger event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
-
- // Auto-register the trigger name with the pin controller (if necessary)
- if (!registered)
- {
- BcpServer.Instance.Send(BcpMessage.RegisterTriggerMessage("high_score_award_display"));
- registered = true;
- }
-
- BcpMessageController.OnTrigger += Trigger;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP Trigger event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTrigger -= Trigger;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a trigger message is received from MPF.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Trigger(object sender, TriggerMessageEventArgs e)
- {
- // Determine if this trigger message is the one we are interested in. If so, send specified FSM event.
- if (e.Name == "high_score_award_display")
- {
- try
- {
- award = e.BcpMessage.Parameters["award"].Value;
- playerName = e.BcpMessage.Parameters["player_name"].Value;
- value = e.BcpMessage.Parameters["value"].AsInt;
- Fsm.Event(sendEvent);
- }
- catch (Exception ex)
- {
- BcpServer.Instance.Send(BcpMessage.ErrorMessage("An error occurred while processing a 'high_score_award_display' trigger message: " + ex.Message, e.BcpMessage.RawMessage));
- }
-
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreEnterInitials.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreEnterInitials.cs
deleted file mode 100644
index 14edb8a..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreEnterInitials.cs
+++ /dev/null
@@ -1,334 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-using System.Collections.Generic;
-using BCP.SimpleJSON;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when a high_score_enter_initials BCP Trigger
-/// command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends a series of special events to control the high score initials entry process.")]
-public class GetBCPHighScoreEnterInitials : FsmStateAction
-{
- [RequiredField]
- [Tooltip("The maximum number of characters permitted")]
- public int maxCharacters;
-
- [RequiredField]
- [Tooltip("The name of the event that initializes the state (initial trigger)")]
- public string initializationEventName;
-
- [RequiredField]
- [UIHint(UIHint.TextArea)]
- [Tooltip("The available characters the user is presented during intitial selection")]
- public string characterSet;
-
- [RequiredField]
- [Tooltip("The name of the event to shift left/decrement")]
- public string shiftLeftEvent;
-
- [RequiredField]
- [Tooltip("The name of the event to shift right/increment")]
- public string shiftRightEvent;
-
- [RequiredField]
- [Tooltip("The name of the event to select")]
- public string selectEvent;
-
- [RequiredField]
- [Tooltip("The name of the event to abort")]
- public string abortEvent;
-
- [RequiredField]
- [Tooltip("The number of seconds before the enter initials process times out")]
- public float timeoutSeconds;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable that contains the selected initials")]
- public FsmString selectedInitials;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when the current character position is changed")]
- public FsmEvent characterPositionChangedEvent;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when the currently selected character is changed")]
- public FsmEvent characterChangedEvent;
-
- private int currentCharacter;
- private int currentPosition;
- private List initials = null;
- private List characterList = null;
- private float timeoutSecondsRemaining;
-
-
- public override void Awake()
- {
- base.Awake();
- }
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: Reset");
-
- base.Reset();
- maxCharacters = 3;
- timeoutSeconds = 20.0f;
- shiftLeftEvent = "sw_left_flipper";
- shiftRightEvent = "sw_right_flipper";
- selectEvent = "sw_start";
- abortEvent = "sw_esc";
- characterSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_- ";
-
- currentCharacter = 0;
- currentPosition = 0;
-
- if (initials == null)
- initials = new List(maxCharacters);
- else
- initials.Clear();
-
- for (int index = 0; index < maxCharacters; index++)
- initials.Add("");
-
- BuildCharacterList();
- }
-
- ///
- /// Called every frame by Unity. Updates the timer.
- ///
- public override void OnUpdate()
- {
- if (!this.Finished)
- {
- timeoutSecondsRemaining -= Time.deltaTime;
- if (timeoutSecondsRemaining <= 0.0f)
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: Timeout reached");
- // Abort();
- }
- }
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP event handlers.
- ///
- public override void OnEnter()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: OnEnter");
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: Events (" + shiftLeftEvent + ", " + shiftRightEvent + ", " + selectEvent + ")");
- base.OnEnter();
-
- FsmTransition lastTransition = Fsm.LastTransition;
- if (lastTransition.EventName == initializationEventName)
- {
- timeoutSecondsRemaining = timeoutSeconds;
- currentCharacter = 0;
- currentPosition = 0;
-
- if (initials == null)
- initials = new List(maxCharacters);
- else
- initials.Clear();
-
- for (int index = 0; index < maxCharacters; index++)
- initials.Add("");
-
- BuildCharacterList();
-
- PositionChanged();
- CharacterChanged();
- }
-
- BcpMessageController.OnSwitch += Switch;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP event handlers.
- ///
- public override void OnExit()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: OnExit");
-
- BcpMessageController.OnSwitch -= Switch;
- base.OnExit();
- }
-
- ///
- ///
- ///
- ///
- ///
- public void Switch(object sender, SwitchMessageEventArgs e)
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: Switch (" + e.Name + ", " + e.State.ToString() + ")");
-
- if (e.State != 1)
- return;
-
- if (e.Name == shiftLeftEvent) ShiftLeft();
- else if (e.Name == shiftRightEvent) ShiftRight();
- else if (e.Name == selectEvent) Select();
- else if (e.Name == abortEvent) Abort();
- }
-
- ///
- /// Called when user presses shift left button
- ///
- private void ShiftLeft()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: ShiftLeft");
-
- currentCharacter--;
- if (currentCharacter < 0)
- currentCharacter = characterList.Count - 1;
-
- CharacterChanged();
- }
-
- ///
- /// Called when user presses shift right button
- ///
- private void ShiftRight()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: ShiftRight");
-
- currentCharacter++;
- if (currentCharacter >= characterList.Count)
- currentCharacter = 0;
-
- CharacterChanged();
- }
-
- ///
- /// Called when user presses select button
- ///
- private void Select()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: Select");
-
- // Check for special characters (back, end)
- if (characterList[currentCharacter] == "back")
- {
- if (currentPosition > 0)
- {
- currentPosition--;
- PositionChanged();
- }
-
- }
- else if (characterList[currentCharacter] == "end")
- {
- Done();
- }
- else
- {
-
- // Add selected character to saved initials string
- initials[currentPosition] += characterList[currentCharacter];
-
- // Go to next position (or end)
- currentPosition++;
- if (currentPosition >= maxCharacters)
- {
- Done();
- }
- else
- {
- PositionChanged();
- BuildCharacterList();
- }
- }
- }
-
- ///
- /// Aborts the initial entering process sending back an empty string
- ///
- private void Abort()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: Abort");
-
- initials.Clear();
-
- for (int index = 0; index < maxCharacters; index++)
- initials.Add("");
-
- Done();
- }
-
- ///
- /// Called whenever the current character changes
- ///
- private void CharacterChanged()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: CharacterChanged");
-
- // Set event data (new character) and send character changed event
- FsmEventData data = new FsmEventData();
- data.StringData = characterList[currentCharacter];
- Fsm.EventData = data;
- Fsm.Event(characterChangedEvent);
- }
-
- ///
- /// Called whenever the current character position changes
- ///
- private void PositionChanged()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: PositionChanged");
-
- // Set event data (new position) and send position changed event
- FsmEventData data = new FsmEventData();
- data.IntData = currentPosition + 1;
- Fsm.EventData = data;
- Fsm.Event(characterPositionChangedEvent);
- }
-
- ///
- /// Build a list of characters to select from
- ///
- private void BuildCharacterList()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: BuildCharacterList");
-
- if (characterList == null)
- characterList = new List();
-
- characterList.Clear();
-
- for (int index = 0; index < characterSet.Length; index++)
- characterList.Add(characterSet[index].ToString());
-
- if (currentCharacter > 1)
- characterList.Add("back");
-
- characterList.Add("end");
-
- }
-
- ///
- /// Called internally when the user has completed entering their initials.
- ///
- private void Done()
- {
- BcpLogger.Trace("GetBCPHighScoreEnterInitials: Done");
-
- string finalInitials = string.Join("", initials).TrimEnd();
- if (!selectedInitials.IsNone)
- selectedInitials.Value = finalInitials;
-
- FsmEventData data = new FsmEventData();
- data.StringData = finalInitials;
-
- // Call the base class Finish function to finish the action
- Finish();
- }
-
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreNotification.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreNotification.cs
deleted file mode 100644
index 522b353..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPHighScoreNotification.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when a high_score_enter_initials BCP Trigger
-/// command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when the special BCP Trigger high_score_enter_initials command is received.")]
-public class GetBCPHighScoreNotification: FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the award label value")]
- public FsmString award;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the player number")]
- public FsmInt player;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the high score value")]
- public FsmInt value;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when the high_score_enter_initials BCP Trigger is received")]
- public FsmEvent sendEvent;
-
- private bool registered;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- base.Reset();
- award = null;
- player = null;
- value = null;
- sendEvent = null;
- registered = false;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP Trigger event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
-
- // Auto-register the trigger name with the pin controller (if necessary)
- if (!registered)
- {
- BcpServer.Instance.Send(BcpMessage.RegisterTriggerMessage("high_score_enter_initials"));
- registered = true;
- }
-
- BcpMessageController.OnTrigger += Trigger;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP Trigger event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTrigger -= Trigger;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a trigger message is received from MPF.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Trigger(object sender, TriggerMessageEventArgs e)
- {
- // Determine if this trigger message is the one we are interested in. If so, send specified FSM event.
- if (e.Name == "high_score_enter_initials")
- {
- try
- {
- award = e.BcpMessage.Parameters["award"].Value;
- player = e.BcpMessage.Parameters["player_num"].AsInt;
- value = e.BcpMessage.Parameters["value"].AsInt;
- Fsm.Event(sendEvent);
- }
- catch (Exception ex)
- {
- BcpServer.Instance.Send(BcpMessage.ErrorMessage("An error occurred while processing a 'high_score_enter_initials' trigger message: " + ex.Message, e.BcpMessage.RawMessage));
- }
-
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariable.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariable.cs
deleted file mode 100644
index 731ee93..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariable.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-using BCP.SimpleJSON;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'machine_variable' command is received
-/// (when the machine variable changes).
-///
-[ActionCategory("BCP")]
-[Tooltip("Retrieves the current value of an MPF machine_variable.")]
-public class GetBCPMachineVariable : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF machine variable to retrieve")]
- public string machineVariableName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The string variable to receive the value of the specified MPF machine variable")]
- public FsmString stringValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The int variable to receive the value of the specified MPF machine variable")]
- public FsmInt intValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The float variable to receive the value of the specified MPF machine variable")]
- public FsmFloat floatValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The boolean variable to receive the value of the specified MPF machine variable")]
- public FsmBool boolValue;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- machineVariableName = null;
- stringValue = null;
- intValue = null;
- floatValue = null;
- boolValue = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'machine_variable' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
-
- if (!String.IsNullOrEmpty(machineVariableName))
- {
- JSONNode variable = BcpMessageManager.Instance.GetMachineVariable(machineVariableName);
- if (variable != null)
- {
- if (stringValue != null && !stringValue.IsNone) stringValue.Value = variable.Value;
- if (intValue != null && !intValue.IsNone) intValue.Value = variable.AsInt;
- if (floatValue != null && !floatValue.IsNone) floatValue.Value = variable.AsFloat;
- if (boolValue != null && !boolValue.IsNone) boolValue.Value = variable.AsBool;
- }
- }
-
- Finish();
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariableChange.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariableChange.cs
deleted file mode 100644
index 405adf2..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariableChange.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-using BCP.SimpleJSON;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'machine_variable' command is received
-/// (when the machine variable changes).
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'machine_variable' command is received.")]
-public class GetBCPMachineVariableChange : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF machine variable to listen for")]
- public string machineVariableName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The string variable to receive the new value of the specified MPF machine variable")]
- public FsmString stringValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The int variable to receive the new value of the specified MPF machine variable")]
- public FsmInt intValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The float variable to receive the new value of the specified MPF machine variable")]
- public FsmFloat floatValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The boolean variable to receive the new value of the specified MPF machine variable")]
- public FsmBool boolValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'machine_variable' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- machineVariableName = null;
- stringValue = null;
- intValue = null;
- floatValue = null;
- boolValue = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'machine_variable' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnMachineVariable += MachineVariable;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'machine_variable' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnMachineVariable -= MachineVariable;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a machine variable event is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void MachineVariable(object sender, MachineVariableMessageEventArgs e)
- {
- // Determine if this machine variable message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(machineVariableName) && e.Name == machineVariableName)
- {
- JSONNode variable = e.Value;
- if (variable != null)
- {
- if (stringValue != null && !stringValue.IsNone) stringValue.Value = variable.Value;
- if (intValue != null && !intValue.IsNone) intValue.Value = variable.AsInt;
- if (floatValue != null && !floatValue.IsNone) floatValue.Value = variable.AsFloat;
- if (boolValue != null && !boolValue.IsNone) boolValue.Value = variable.AsBool;
- }
-
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariableString.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariableString.cs
deleted file mode 100644
index b4a094f..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPMachineVariableString.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-using BCP.SimpleJSON;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'machine_variable' command is received
-/// (when the machine variable changes).
-///
-[ActionCategory("BCP")]
-[Tooltip("Retrieves the current value of an MPF machine_variable.")]
-public class GetBCPMachineVariableString : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF machine variable to retrieve")]
- public string machineVariableName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the specified MPF machine variable")]
- public FsmString value;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- machineVariableName = null;
- value = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'machine_variable' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
-
- if (!String.IsNullOrEmpty(machineVariableName))
- {
- JSONNode variable = BcpMessageManager.Instance.GetMachineVariable(machineVariableName);
- if (variable != null)
- value.Value = variable.Value;
- }
-
- Finish();
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPModeStart.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPModeStart.cs
deleted file mode 100644
index 7c7438d..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPModeStart.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'mode_start' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'mode_start' command is received.")]
-public class GetBCPModeStart : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF mode to listen for")]
- public string modeName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the priority for the specified mode")]
- public FsmInt priority;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'mode_start' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- modeName = null;
- priority = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'mode_start' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnModeStart += ModeStart;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'mode_start' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnModeStart -= ModeStart;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a mode is started.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void ModeStart(object sender, ModeStartMessageEventArgs e)
- {
- // Determine if this mode message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(modeName) && e.Name == modeName)
- {
- if (!priority.IsNone)
- priority.Value = e.Priority;
-
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPModeStop.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPModeStop.cs
deleted file mode 100644
index 82ebb6e..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPModeStop.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'mode_stop' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'mode_stop' command is received.")]
-public class GetBCPModeStop : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF mode to listen for")]
- public string modeName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'mode_stop' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- modeName = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'mode_stop' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnModeStop += ModeStop;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'mode_stop' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnModeStop -= ModeStop;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a mode stops.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void ModeStop(object sender, ModeStopMessageEventArgs e)
- {
- // Determine if this mode message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(modeName) && e.Name == modeName)
- Fsm.Event(sendEvent);
-
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerAdded.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerAdded.cs
deleted file mode 100644
index f57dd7b..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerAdded.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'player_added' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'player_added' command is received.")]
-public class GetBCPPlayerAdded : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the player number for the newly added player")]
- public FsmInt number;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'player_added' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- number = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'player_added' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnPlayerAdded += PlayerAdded;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'player_added' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnPlayerAdded -= PlayerAdded;
- base.OnExit();
- }
-
-
- ///
- /// Event handler called when a player added event is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void PlayerAdded(object sender, PlayerAddedMessageEventArgs e)
- {
- number.Value = e.PlayerNum;
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerScore.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerScore.cs
deleted file mode 100644
index 075926d..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerScore.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'player_score' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'player_score' command is received.")]
-public class GetBCPPlayerScore : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the score value for the current player")]
- public FsmInt score;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the previous score value for the current player")]
- public FsmInt previousScore;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the change in value for the current player's score")]
- public FsmInt change;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'player_score' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- score = null;
- previousScore = null;
- change = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'player_score' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnPlayerScore += PlayerScore;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'player_score' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnPlayerScore -= PlayerScore;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a player score event is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void PlayerScore(object sender, PlayerScoreMessageEventArgs e)
- {
- score.Value = e.Value;
-
- if (!previousScore.IsNone)
- previousScore.Value = e.PreviousValue;
- if (!change.IsNone)
- change.Value = e.Change;
-
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerTurnStart.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerTurnStart.cs
deleted file mode 100644
index 65ad9f2..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerTurnStart.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'player_turn_start' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'player_turn_start' command is received.")]
-public class GetBCPPlayerTurnStart : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the player number whose turn has just started")]
- public FsmInt player;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'player_turn_start' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- player = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'player_turn_start' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnPlayerTurnStart += PlayerTurnStart;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'player_turn_start' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnPlayerTurnStart -= PlayerTurnStart;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a player turn start event is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void PlayerTurnStart(object sender, PlayerTurnStartMessageEventArgs e)
- {
- player.Value = e.PlayerNum;
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariable.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariable.cs
deleted file mode 100644
index 7a4b700..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariable.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-using BCP.SimpleJSON;
-
-///
-/// Custom PlayMaker action for MPF that retrieves the value of a 'player_variable'.
-///
-[ActionCategory("BCP")]
-[Tooltip("Retrieves the value of an MPF player_variable.")]
-public class GetBCPPlayerVariable : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF player variable to retrieve")]
- public string playerVariableName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The player number of the MPF player variable to retrieve")]
- public int playerNum;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The string variable to receive the value of the specified MPF player variable")]
- public FsmString stringValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The int variable to receive the value of the specified MPF player variable")]
- public FsmInt intValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The float variable to receive the value of the specified MPF player variable")]
- public FsmFloat floatValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The boolean variable to receive the value of the specified MPF player variable")]
- public FsmBool boolValue;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- playerVariableName = null;
- playerNum = 1;
- stringValue = null;
- intValue = null;
- floatValue = null;
- boolValue = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'machine_variable' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
-
- if (!String.IsNullOrEmpty(playerVariableName))
- {
- JSONNode variable = BcpMessageManager.Instance.GetPlayerVariable(playerNum, playerVariableName);
- if (variable != null)
- {
- if (stringValue != null && !stringValue.IsNone) stringValue.Value = variable.Value;
- if (intValue != null && !intValue.IsNone) intValue.Value = variable.AsInt;
- if (floatValue != null && !floatValue.IsNone) floatValue.Value = variable.AsFloat;
- if (boolValue != null && !boolValue.IsNone) boolValue.Value = variable.AsBool;
- }
- }
-
- Finish();
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChange.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChange.cs
deleted file mode 100644
index d154980..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChange.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'player_variable' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'player_variable' command is received.")]
-public class GetBCPPlayerVariableChange : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF player variable to listen for")]
- public string playerVariableName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the specified MPF player variable")]
- public FsmInt playerNum;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the specified MPF player variable")]
- public FsmString value;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the previous value of the specified MPF player variable")]
- public FsmString previousValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the change in value of the specified MPF player variable")]
- public FsmString change;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'player_variable' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- playerVariableName = null;
- playerNum = null;
- value = null;
- previousValue = null;
- change = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'player_variable' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnPlayerVariable += PlayerVariable;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'player_variable' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnPlayerVariable -= PlayerVariable;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a player variable event is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void PlayerVariable(object sender, PlayerVariableMessageEventArgs e)
- {
- // Determine if this player variable message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(playerVariableName) && e.Name == playerVariableName)
- {
- if (!playerNum.IsNone)
- playerNum.Value = e.PlayerNum;
-
- if (!value.IsNone)
- value.Value = e.Value;
-
- if (!previousValue.IsNone)
- previousValue.Value = e.PreviousValue;
-
- if (!change.IsNone)
- change.Value = e.Change;
-
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeBool.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeBool.cs
deleted file mode 100644
index f33c96c..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeBool.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'player_variable' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'player_variable' command is received.")]
-public class GetBCPPlayerVariableChangeBool : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF player variable to listen for")]
- public string playerVariableName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the specified MPF player variable")]
- public FsmInt playerNum;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the specified MPF player variable (bool)")]
- public FsmBool value;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the previous value of the specified MPF player variable (bool)")]
- public FsmBool previousValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the change in value of the specified MPF player variable (bool)")]
- public FsmBool change;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'player_variable' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- playerVariableName = null;
- playerNum = null;
- value = null;
- previousValue = null;
- change = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'player_variable' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnPlayerVariable += PlayerVariable;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'player_variable' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnPlayerVariable -= PlayerVariable;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a player variable event is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void PlayerVariable(object sender, PlayerVariableMessageEventArgs e)
- {
- // Determine if this player variable message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(playerVariableName) && e.Name == playerVariableName)
- {
- if (!playerNum.IsNone)
- playerNum.Value = e.PlayerNum;
-
- if (!value.IsNone)
- value.Value = e.Value.AsBool;
-
- if (!previousValue.IsNone)
- previousValue.Value = e.PreviousValue.AsBool;
-
- if (!change.IsNone)
- change.Value = e.Change.AsBool;
-
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeFloat.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeFloat.cs
deleted file mode 100644
index def9e52..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeFloat.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'player_variable' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'player_variable' command is received.")]
-public class GetBCPPlayerVariableChangeFloat : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF player variable to listen for")]
- public string playerVariableName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the specified MPF player variable")]
- public FsmInt playerNum;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the specified MPF player variable (float)")]
- public FsmFloat value;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the previous value of the specified MPF player variable (float)")]
- public FsmFloat previousValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the change in value of the specified MPF player variable (float)")]
- public FsmFloat change;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'player_variable' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- playerVariableName = null;
- playerNum = null;
- value = null;
- previousValue = null;
- change = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'player_variable' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnPlayerVariable += PlayerVariable;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'player_variable' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnPlayerVariable -= PlayerVariable;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a player variable event is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void PlayerVariable(object sender, PlayerVariableMessageEventArgs e)
- {
- // Determine if this player variable message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(playerVariableName) && e.Name == playerVariableName)
- {
- if (!playerNum.IsNone)
- playerNum.Value = e.PlayerNum;
-
- if (!value.IsNone)
- value.Value = e.Value.AsFloat;
-
- if (!previousValue.IsNone)
- previousValue.Value = e.PreviousValue.AsFloat;
-
- if (!change.IsNone)
- change.Value = e.Change.AsFloat;
-
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeInt.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeInt.cs
deleted file mode 100644
index a170d54..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableChangeInt.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'player_variable' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'player_variable' command is received.")]
-public class GetBCPPlayerVariableChangeInt : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF player variable to listen for")]
- public string playerVariableName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the specified MPF player variable")]
- public FsmInt playerNum;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the value of the specified MPF player variable (int)")]
- public FsmInt value;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the previous value of the specified MPF player variable (int)")]
- public FsmInt previousValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the change in value of the specified MPF player variable (int)")]
- public FsmInt change;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'player_variable' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- playerVariableName = null;
- playerNum = null;
- value = null;
- previousValue = null;
- change = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'player_variable' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnPlayerVariable += PlayerVariable;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'player_variable' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnPlayerVariable -= PlayerVariable;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a player variable event is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void PlayerVariable(object sender, PlayerVariableMessageEventArgs e)
- {
- // Determine if this player variable message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(playerVariableName) && e.Name == playerVariableName)
- {
- if (!playerNum.IsNone)
- playerNum.Value = e.PlayerNum;
-
- if (!value.IsNone)
- value.Value = e.Value.AsInt;
-
- if (!previousValue.IsNone)
- previousValue.Value = e.PreviousValue.AsInt;
-
- if (!change.IsNone)
- change.Value = e.Change.AsInt;
-
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableCurrentPlayer.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableCurrentPlayer.cs
deleted file mode 100644
index dee3b4a..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPPlayerVariableCurrentPlayer.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-using BCP.SimpleJSON;
-
-///
-/// Custom PlayMaker action for MPF that retrieves the value of a 'player_variable' for
-/// the current player.
-///
-[ActionCategory("BCP")]
-[Tooltip("Retrieves the value of an MPF player_variable for the current player.")]
-public class GetBCPPlayerVariableCurrentPlayer : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF player variable to retrieve")]
- public string playerVariableName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The string variable to receive the value of the specified MPF player variable")]
- public FsmString stringValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The int variable to receive the value of the specified MPF player variable")]
- public FsmInt intValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The float variable to receive the value of the specified MPF player variable")]
- public FsmFloat floatValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The boolean variable to receive the value of the specified MPF player variable")]
- public FsmBool boolValue;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- playerVariableName = null;
- stringValue = null;
- intValue = null;
- floatValue = null;
- boolValue = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'machine_variable' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
-
- if (!String.IsNullOrEmpty(playerVariableName))
- {
- JSONNode variable = BcpMessageManager.Instance.GetPlayerVariableCurrentPlayer(playerVariableName);
- if (variable != null)
- {
- if (stringValue != null && !stringValue.IsNone) stringValue.Value = variable.Value;
- if (intValue != null && !intValue.IsNone) intValue.Value = variable.AsInt;
- if (floatValue != null && !floatValue.IsNone) floatValue.Value = variable.AsFloat;
- if (boolValue != null && !boolValue.IsNone) boolValue.Value = variable.AsBool;
- }
- }
-
- Finish();
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPReset.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPReset.cs
deleted file mode 100644
index de3ff3d..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPReset.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'reset' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'reset' command is received.")]
-public class GetBCPReset : FsmStateAction
-{
- [UIHint(UIHint.Variable)]
- [Tooltip("Flag indicating whether or not this is a 'hard' reset")]
- public FsmBool hard;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'reset' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- hard = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'reset' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnReset += BcpReset;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'reset' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnReset -= BcpReset;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a reset command is received.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void BcpReset(object sender, ResetMessageEventArgs e)
- {
- if (!hard.IsNone)
- hard.Value = e.Hard;
-
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPSetting.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPSetting.cs
deleted file mode 100644
index f21f93f..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPSetting.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-using BCP.SimpleJSON;
-
-///
-/// Custom PlayMaker action for MPF that retrieves the current value for a named setting.
-///
-[ActionCategory("BCP")]
-[Tooltip("Retrieves the current value of an MPF setting.")]
-public class GetBCPSetting : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF setting to retrieve")]
- public string settingName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The string variable to receive the value of the specified MPF setting")]
- public FsmString stringValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The int variable to receive the value of the specified MPF setting")]
- public FsmInt intValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The float variable to receive the value of the specified MPF setting")]
- public FsmFloat floatValue;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The boolean variable to receive the value of the specified MPF setting")]
- public FsmBool boolValue;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- settingName = null;
- stringValue = null;
- intValue = null;
- floatValue = null;
- boolValue = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'machine_variable' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
-
- if (!String.IsNullOrEmpty(settingName))
- {
- JSONNode variable = BcpMessageManager.Instance.GetSetting(settingName);
- if (variable != null)
- {
- if (stringValue != null && !stringValue.IsNone) stringValue.Value = variable.Value;
- if (intValue != null && !intValue.IsNone) intValue.Value = variable.AsInt;
- if (floatValue != null && !floatValue.IsNone) floatValue.Value = variable.AsFloat;
- if (boolValue != null && !boolValue.IsNone) boolValue.Value = variable.AsBool;
- }
- }
-
- Finish();
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPSlamTilt.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPSlamTilt.cs
deleted file mode 100644
index d53a579..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPSlamTilt.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'slam_tilt' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'slam_tilt' command is received.")]
-public class GetBCPSlamTilt : FsmStateAction
-{
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'slam_tilt' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'slam_tilt' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnSlamTilt += SlamTilt;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'slam_tilt' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnSlamTilt -= SlamTilt;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a slam tilt event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void SlamTilt(object sender, BcpMessageEventArgs e)
- {
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPSwitchActive.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPSwitchActive.cs
deleted file mode 100644
index fb2a0cd..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPSwitchActive.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'switch' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'switch' active command is received.")]
-public class GetBCPSwitchActive : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF switch to listen for")]
- public string switchName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'switch' active command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- switchName = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'switch' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnSwitch += Switch;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'switch' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnSwitch -= Switch;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a switch changes states.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Switch(object sender, SwitchMessageEventArgs e)
- {
- // Determine if this switch message is the one we are interested in (name and value equal desired values). If so, send specified FSM event.
- if (!String.IsNullOrEmpty(switchName) && e.Name == switchName && e.State == 1)
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPSwitchInactive.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPSwitchInactive.cs
deleted file mode 100644
index eb32a75..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPSwitchInactive.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'switch' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'switch' inactive command is received.")]
-public class GetBCPSwitchInactive : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF switch to listen for")]
- public string switchName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'switch' inactive command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- switchName = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'switch' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnSwitch += Switch;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'switch' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnSwitch -= Switch;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a switch changes states.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Switch(object sender, SwitchMessageEventArgs e)
- {
- // Determine if this switch message is the one we are interested in (name and value equal desired values). If so, send specified FSM event.
- if (!String.IsNullOrEmpty(switchName) && e.Name == switchName && e.State == 0)
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTilt.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTilt.cs
deleted file mode 100644
index f4948b7..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTilt.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'tilt' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'tilt' command is received.")]
-public class GetBCPTilt : FsmStateAction
-{
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'tilt' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'tilt' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnTilt += Tilt;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'tilt' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTilt -= Tilt;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a tilt event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Tilt(object sender, BcpMessageEventArgs e)
- {
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTiltWarning.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTiltWarning.cs
deleted file mode 100644
index 065e100..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTiltWarning.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'tilt_warning' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'tilt_warning' command is received.")]
-public class GetBCPTiltWarning : FsmStateAction
-{
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the number of tilt warnings value")]
- public FsmInt warnings;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the number of tilt warnings remaining before a tilt value")]
- public FsmInt warningsRemaining;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'tilt_warning' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- warnings = null;
- warningsRemaining = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'tilt_warning' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnTiltWarning += TiltWarning;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'tilt_warning' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTiltWarning -= TiltWarning;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a tilt warning event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void TiltWarning(object sender, TiltWarningMessageEventArgs e)
- {
- if (!warnings.IsNone)
- warnings.Value = e.Warnings;
-
- if (!warningsRemaining.IsNone)
- warningsRemaining.Value = e.WarningsRemaining;
-
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTimer.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTimer.cs
deleted file mode 100644
index 1cf815e..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTimer.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'timer' command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'timer' command is received.")]
-public class GetBCPTimer : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF timer to listen for")]
- public string timerName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer action value")]
- public FsmString action;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer ticks value")]
- public FsmInt ticks;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'timer' command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- timerName = null;
- action = null;
- ticks = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'timer' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnTimer += Timer;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'timer' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTimer -= Timer;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a timer event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Timer(object sender, TimerMessageEventArgs e)
- {
- // Determine if this timer message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(timerName) && e.Name == timerName)
- {
- action.Value = e.Action;
- ticks.Value = e.Ticks;
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerComplete.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTimerComplete.cs
deleted file mode 100644
index df6fd5f..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerComplete.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'timer' complte command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'timer' complete command is received.")]
-public class GetBCPTimerComplete : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF timer to listen for")]
- public string timerName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer ticks value")]
- public FsmInt ticks;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'timer' complete command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- timerName = null;
- ticks = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'timer' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnTimer += Timer;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'timer' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTimer -= Timer;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a timer event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Timer(object sender, TimerMessageEventArgs e)
- {
- // Determine if this timer message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(timerName) && e.Name == timerName && e.Action == "complete")
- {
- ticks.Value = e.Ticks;
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerPaused.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTimerPaused.cs
deleted file mode 100644
index 438f79f..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerPaused.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'timer' paused command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'timer' paused command is received.")]
-public class GetBCPTimerPaused : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF timer to listen for")]
- public string timerName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer ticks value")]
- public FsmInt ticks;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'timer' paused command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- timerName = null;
- ticks = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'timer' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnTimer += Timer;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'timer' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTimer -= Timer;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a timer event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Timer(object sender, TimerMessageEventArgs e)
- {
- // Determine if this timer message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(timerName) && e.Name == timerName && e.Action == "paused")
- {
- ticks.Value = e.Ticks;
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerStarted.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTimerStarted.cs
deleted file mode 100644
index c11a601..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerStarted.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'timer' started command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'timer' started command is received.")]
-public class GetBCPTimerStarted : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF timer to listen for")]
- public string timerName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer ticks value")]
- public FsmInt ticks;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'timer' started command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- timerName = null;
- ticks = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'timer' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnTimer += Timer;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'timer' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTimer -= Timer;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a timer event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Timer(object sender, TimerMessageEventArgs e)
- {
- // Determine if this timer message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(timerName) && e.Name == timerName && e.Action == "started")
- {
- ticks.Value = e.Ticks;
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerStopped.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTimerStopped.cs
deleted file mode 100644
index 500e797..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerStopped.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'timer' stopped command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'timer' stopped command is received.")]
-public class GetBCPTimerStopped : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF timer to listen for")]
- public string timerName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer ticks value")]
- public FsmInt ticks;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'timer' stopped command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- timerName = null;
- ticks = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'timer' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnTimer += Timer;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'timer' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTimer -= Timer;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a timer event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Timer(object sender, TimerMessageEventArgs e)
- {
- // Determine if this timer message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(timerName) && e.Name == timerName && e.Action == "stopped")
- {
- ticks.Value = e.Ticks;
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerTick.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTimerTick.cs
deleted file mode 100644
index 45fff21..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerTick.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'timer' tick command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'timer' tick command is received.")]
-public class GetBCPTimerTick : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF timer to listen for")]
- public string timerName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer ticks value")]
- public FsmInt ticks;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'timer' tick command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- timerName = null;
- ticks = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'timer' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnTimer += Timer;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'timer' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTimer -= Timer;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a timer event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Timer(object sender, TimerMessageEventArgs e)
- {
- // Determine if this timer message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(timerName) && e.Name == timerName && e.Action == "tick")
- {
- ticks.Value = e.Ticks;
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerTimeAdded.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTimerTimeAdded.cs
deleted file mode 100644
index 31e5bff..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerTimeAdded.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'timer' time_added command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'timer' time_added command is received.")]
-public class GetBCPTimerTimeAdded : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF timer to listen for")]
- public string timerName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer ticks value")]
- public FsmInt ticks;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer ticks added value")]
- public FsmInt ticksAdded;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'timer' time_added command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- timerName = null;
- ticks = null;
- ticksAdded = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'timer' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnTimer += Timer;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'timer' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTimer -= Timer;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a timer event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Timer(object sender, TimerMessageEventArgs e)
- {
- // Determine if this timer message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(timerName) && e.Name == timerName && e.Action == "time_added")
- {
- ticks.Value = e.Ticks;
-
- // Attempt to retrieve the "ticks_added" parameter and store it in a FSM variable
- if (!ticksAdded.IsNone && !String.IsNullOrEmpty(e.BcpMessage.Parameters["ticks_added"]))
- {
- int added;
- if (int.TryParse(e.BcpMessage.Parameters["ticks_added"], out added))
- ticksAdded.Value = added;
- }
-
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerTimeSubtracted.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTimerTimeSubtracted.cs
deleted file mode 100644
index 5b571bf..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTimerTimeSubtracted.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an MPF 'timer' time_subtracted command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an MPF 'timer' time_subtracted command is received.")]
-public class GetBCPTimerTimeSubtracted : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the MPF timer to listen for")]
- public string timerName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer ticks value")]
- public FsmInt ticks;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable to receive the timer ticks subtracted value")]
- public FsmInt ticksSubtracted;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when an MPF 'timer' time_subtracted command is received")]
- public FsmEvent sendEvent;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- timerName = null;
- ticks = null;
- ticksSubtracted = null;
- sendEvent = null;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP 'timer' event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpMessageController.OnTimer += Timer;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP 'timer' event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTimer -= Timer;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a timer event occurs.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Timer(object sender, TimerMessageEventArgs e)
- {
- // Determine if this timer message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(timerName) && e.Name == timerName && e.Action == "time_subtracted")
- {
- ticks.Value = e.Ticks;
-
- // Attempt to retrieve the "ticks_subtracted" parameter and store it in a FSM variable
- if (!ticksSubtracted.IsNone && !String.IsNullOrEmpty(e.BcpMessage.Parameters["ticks_subtracted"]))
- {
- int subtracted;
- if (int.TryParse(e.BcpMessage.Parameters["ticks_subtracted"], out subtracted))
- ticksSubtracted.Value = subtracted;
- }
-
- Fsm.Event(sendEvent);
- }
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/GetBCPTrigger.cs b/Assets/BCP/Scripts/PlayMaker/GetBCPTrigger.cs
deleted file mode 100644
index 85d0584..0000000
--- a/Assets/BCP/Scripts/PlayMaker/GetBCPTrigger.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends an Event when an BCP Trigger command is received.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends an Event when an BCP Trigger command is received.")]
-public class GetBCPTrigger : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the BCP Trigger to listen for")]
- public string triggerName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("Whether or not to automatically register the trigger name with MPF")]
- public bool autoRegisterTriggerName;
-
- [UIHint(UIHint.Variable)]
- [Tooltip("The PlayMaker event to send when the specified BCP Trigger is received")]
- public FsmEvent sendEvent;
-
- private bool registered;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- base.Reset();
- triggerName = null;
- autoRegisterTriggerName = true;
- sendEvent = null;
- registered = false;
- }
-
- ///
- /// Called when the state becomes active. Adds the MPF BCP Trigger event handler.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
-
- // Auto-register the trigger name with the pin controller (if necessary)
- if (autoRegisterTriggerName && !String.IsNullOrEmpty(triggerName) && !registered)
- {
- BcpServer.Instance.Send(BcpMessage.RegisterTriggerMessage(triggerName));
- registered = true;
- }
-
- BcpMessageController.OnTrigger += Trigger;
- }
-
- ///
- /// Called before leaving the current state. Removes the MPF BCP Trigger event handler.
- ///
- public override void OnExit()
- {
- BcpMessageController.OnTrigger -= Trigger;
- base.OnExit();
- }
-
- ///
- /// Event handler called when a trigger message is received from MPF.
- ///
- /// The sender.
- /// The instance containing the event data.
- public void Trigger(object sender, TriggerMessageEventArgs e)
- {
- // Determine if this trigger message is the one we are interested in. If so, send specified FSM event.
- if (!String.IsNullOrEmpty(triggerName) && e.Name == triggerName)
- Fsm.Event(sendEvent);
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/SendBCPInputHighScoreComplete.cs b/Assets/BCP/Scripts/PlayMaker/SendBCPInputHighScoreComplete.cs
deleted file mode 100644
index ef54f85..0000000
--- a/Assets/BCP/Scripts/PlayMaker/SendBCPInputHighScoreComplete.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-using BCP.SimpleJSON;
-
-///
-/// Custom PlayMaker action for MPF that sends a Trigger BCP command to MPF.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends 'text_input_high_score_complete' Trigger BCP command to MPF.")]
-public class SendBCPInputHighScoreComplete : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The variable containing text initials of the high score player to send to MPF")]
- public FsmString text;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- text = null;
- }
-
- ///
- /// Called when the state becomes active. Sends the BCP Trigger command to MPF.
- ///
- public override void OnEnter()
- {
- BcpMessage message = BcpMessage.TriggerMessage("text_input_high_score_complete");
- message.Parameters["text"] = new JSONString(text.Value);
- BcpServer.Instance.Send(message);
-
- Finish();
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/SendBCPSetMachineVariable.cs b/Assets/BCP/Scripts/PlayMaker/SendBCPSetMachineVariable.cs
deleted file mode 100644
index b73c9e9..0000000
--- a/Assets/BCP/Scripts/PlayMaker/SendBCPSetMachineVariable.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends a Set Machine Variable command to MPF.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends Set Machine Variable BCP command to MPF.")]
-public class SendBCPTSetMachineVariable : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the machine variable to set")]
- public string name;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The value of the machine variable to set")]
- public string value;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- name = null;
- value = null;
- }
-
- ///
- /// Called when the state becomes active. Sends the BCP Trigger command to MPF.
- ///
- public override void OnEnter()
- {
- if (!String.IsNullOrEmpty(name))
-
- if (name == null)
- name = "NoneType:";
-
- BcpServer.Instance.Send(BcpMessage.SetMachineVariableMessage(name, value));
-
- Finish();
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/SendBCPSwitch.cs b/Assets/BCP/Scripts/PlayMaker/SendBCPSwitch.cs
deleted file mode 100644
index 1e0582f..0000000
--- a/Assets/BCP/Scripts/PlayMaker/SendBCPSwitch.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends a 'switch' BCP command to MPF.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends 'switch' BCP command to MPF. Can be used to simlulate switch activations (useful in debugging).")]
-public class SendBCPSwitch : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the switch to send to the MPF pinball controller")]
- public string switchName;
-
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The state of the switch to send to the MPF pinball controller (ex: '1' or '0')")]
- public int switchState;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- switchName = null;
- switchState = 0;
- }
-
- ///
- /// Called when the state becomes active. Sends the BCP Trigger command to MPF.
- ///
- public override void OnEnter()
- {
- if (!String.IsNullOrEmpty(switchName))
- BcpServer.Instance.Send(BcpMessage.SwitchMessage(switchName, switchState));
-
- Finish();
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/SendBCPTrigger.cs b/Assets/BCP/Scripts/PlayMaker/SendBCPTrigger.cs
deleted file mode 100644
index a4dc6d6..0000000
--- a/Assets/BCP/Scripts/PlayMaker/SendBCPTrigger.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using UnityEngine;
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that sends a Trigger BCP command to MPF.
-///
-[ActionCategory("BCP")]
-[Tooltip("Sends Trigger BCP command to MPF.")]
-public class SendBCPTrigger : FsmStateAction
-{
- [RequiredField]
- [UIHint(UIHint.Variable)]
- [Tooltip("The name of the trigger to send to the MPF pinball controller")]
- public string triggerName;
-
- ///
- /// Resets this instance to default values.
- ///
- public override void Reset()
- {
- triggerName = null;
- }
-
- ///
- /// Called when the state becomes active. Sends the BCP Trigger command to MPF.
- ///
- public override void OnEnter()
- {
- if (!String.IsNullOrEmpty(triggerName))
- BcpServer.Instance.Send(BcpMessage.TriggerMessage(triggerName));
-
- Finish();
- }
-
-}
diff --git a/Assets/BCP/Scripts/PlayMaker/ShutdownBCPServer.cs b/Assets/BCP/Scripts/PlayMaker/ShutdownBCPServer.cs
deleted file mode 100644
index 3ad4fdb..0000000
--- a/Assets/BCP/Scripts/PlayMaker/ShutdownBCPServer.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using UnityEngine;
-#if UNITY_EDITOR
-using UnityEditor;
-#endif
-using System;
-using HutongGames.PlayMaker;
-using TooltipAttribute = HutongGames.PlayMaker.TooltipAttribute;
-
-///
-/// Custom PlayMaker action for MPF that shuts down the BCP server and quits the Unity application.
-///
-[ActionCategory("BCP")]
-[Tooltip("Shuts down the BCP server and quits the Unity application.")]
-public class ShutdownBCPServer : FsmStateAction
-{
- ///
- /// Called when the state becomes active.
- ///
- public override void OnEnter()
- {
- base.OnEnter();
- BcpServer.Instance.Close();
-
- // Shutdown the Unity application
-#if UNITY_EDITOR
- if (EditorApplication.isPlaying)
- EditorApplication.isPlaying = false;
-#endif
- Application.Quit();
- Finish();
- }
-}
diff --git a/Assets/BCP/Docs/Backbox Communication Protocol (BCP) Server for Unity - Developer's Guide.pdf b/Documentation~/Backbox Communication Protocol (BCP) Server for Unity - Developer's Guide.pdf
similarity index 100%
rename from Assets/BCP/Docs/Backbox Communication Protocol (BCP) Server for Unity - Developer's Guide.pdf
rename to Documentation~/Backbox Communication Protocol (BCP) Server for Unity - Developer's Guide.pdf
diff --git a/LICENSE.md.meta b/LICENSE.md.meta
new file mode 100644
index 0000000..860ba3b
--- /dev/null
+++ b/LICENSE.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d31d9eb1676106641804c39e748a1f84
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/README.md.meta b/README.md.meta
new file mode 100644
index 0000000..8bf802c
--- /dev/null
+++ b/README.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 91849cebffab7234596a1d2c822b62b2
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime.meta b/Runtime.meta
new file mode 100644
index 0000000..6f2d679
--- /dev/null
+++ b/Runtime.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a24032b00a202824f9d0e91cb02cbddc
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/Prefabs.meta b/Runtime/Prefabs.meta
new file mode 100644
index 0000000..f239c51
--- /dev/null
+++ b/Runtime/Prefabs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0b50858bb35dd0d41b9918533d2d4bfb
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BCP/Prefabs/BCP Server.prefab b/Runtime/Prefabs/BCP Server.prefab
similarity index 87%
rename from Assets/BCP/Prefabs/BCP Server.prefab
rename to Runtime/Prefabs/BCP Server.prefab
index 0f0d5cc..eefc6d6 100644
--- a/Assets/BCP/Prefabs/BCP Server.prefab
+++ b/Runtime/Prefabs/BCP Server.prefab
@@ -26,12 +26,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6504608779248296641}
+ serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
- m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3848200001055886468
MonoBehaviour:
@@ -42,7 +43,7 @@ MonoBehaviour:
m_GameObject: {fileID: 6504608779248296641}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 3cc22ed1b543ac94f8c4217acfe5f8aa, type: 3}
+ m_Script: {fileID: 11500000, guid: 24eec60102368004bb214a2e85efc44d, type: 3}
m_Name:
m_EditorClassIdentifier:
listenerPort: 9001
@@ -66,7 +67,7 @@ MonoBehaviour:
m_GameObject: {fileID: 6504608779248296641}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 250d71e3f35b84a468edcd14c2f77b01, type: 3}
+ m_Script: {fileID: 11500000, guid: 36ab749ef5d7d524e8f0144585086973, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &696872919672818599
@@ -78,7 +79,7 @@ MonoBehaviour:
m_GameObject: {fileID: 6504608779248296641}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 601dabf38414842449bbfcaeed426c87, type: 3}
+ m_Script: {fileID: 11500000, guid: 86cb3a6f76bb1e744bf9444d2ed6e536, type: 3}
m_Name:
m_EditorClassIdentifier:
LogFile: log.txt
diff --git a/Runtime/Prefabs/BCP Server.prefab.meta b/Runtime/Prefabs/BCP Server.prefab.meta
new file mode 100644
index 0000000..5ceaf46
--- /dev/null
+++ b/Runtime/Prefabs/BCP Server.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 05abb408965e531439150c27ca4dcf9d
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/Scripts.meta b/Runtime/Scripts.meta
new file mode 100644
index 0000000..71a467f
--- /dev/null
+++ b/Runtime/Scripts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 26bf0340f8a9bcd4086d8891fd497ccb
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BCP/Scripts/BcpLogger.cs b/Runtime/Scripts/BcpLogger.cs
similarity index 100%
rename from Assets/BCP/Scripts/BcpLogger.cs
rename to Runtime/Scripts/BcpLogger.cs
diff --git a/Runtime/Scripts/BcpLogger.cs.meta b/Runtime/Scripts/BcpLogger.cs.meta
new file mode 100644
index 0000000..5cdd544
--- /dev/null
+++ b/Runtime/Scripts/BcpLogger.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 86cb3a6f76bb1e744bf9444d2ed6e536
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BCP/Scripts/BcpMessage.cs b/Runtime/Scripts/BcpMessage.cs
similarity index 100%
rename from Assets/BCP/Scripts/BcpMessage.cs
rename to Runtime/Scripts/BcpMessage.cs
diff --git a/Runtime/Scripts/BcpMessage.cs.meta b/Runtime/Scripts/BcpMessage.cs.meta
new file mode 100644
index 0000000..749c855
--- /dev/null
+++ b/Runtime/Scripts/BcpMessage.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 251330ddd12a7ed449296177be84c59f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BCP/Scripts/BcpMessageManager.cs b/Runtime/Scripts/BcpMessageManager.cs
similarity index 100%
rename from Assets/BCP/Scripts/BcpMessageManager.cs
rename to Runtime/Scripts/BcpMessageManager.cs
diff --git a/Runtime/Scripts/BcpMessageManager.cs.meta b/Runtime/Scripts/BcpMessageManager.cs.meta
new file mode 100644
index 0000000..d20daa2
--- /dev/null
+++ b/Runtime/Scripts/BcpMessageManager.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 24eec60102368004bb214a2e85efc44d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BCP/Scripts/BcpServer.cs b/Runtime/Scripts/BcpServer.cs
similarity index 100%
rename from Assets/BCP/Scripts/BcpServer.cs
rename to Runtime/Scripts/BcpServer.cs
diff --git a/Runtime/Scripts/BcpServer.cs.meta b/Runtime/Scripts/BcpServer.cs.meta
new file mode 100644
index 0000000..4500534
--- /dev/null
+++ b/Runtime/Scripts/BcpServer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 36ab749ef5d7d524e8f0144585086973
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BCP/Scripts/SimpleJSON.cs b/Runtime/Scripts/SimpleJSON.cs
similarity index 100%
rename from Assets/BCP/Scripts/SimpleJSON.cs
rename to Runtime/Scripts/SimpleJSON.cs
diff --git a/Runtime/Scripts/SimpleJSON.cs.meta b/Runtime/Scripts/SimpleJSON.cs.meta
new file mode 100644
index 0000000..be31553
--- /dev/null
+++ b/Runtime/Scripts/SimpleJSON.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2c4fc3e964126ac4c8e3fa37cfe23fef
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Runtime/org.missionpinball.unity-bcp-server.asmdef b/Runtime/org.missionpinball.unity-bcp-server.asmdef
new file mode 100644
index 0000000..b615dda
--- /dev/null
+++ b/Runtime/org.missionpinball.unity-bcp-server.asmdef
@@ -0,0 +1,14 @@
+{
+ "name": "MissionPinball.UnityBcpServer",
+ "rootNamespace": "",
+ "references": [],
+ "includePlatforms": [],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": true,
+ "defineConstraints": [],
+ "versionDefines": [],
+ "noEngineReferences": false
+}
\ No newline at end of file
diff --git a/Runtime/org.missionpinball.unity-bcp-server.asmdef.meta b/Runtime/org.missionpinball.unity-bcp-server.asmdef.meta
new file mode 100644
index 0000000..51f7d51
--- /dev/null
+++ b/Runtime/org.missionpinball.unity-bcp-server.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 5d6475349feaa89428b6b5cc005bb637
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Tests.meta b/Tests.meta
new file mode 100644
index 0000000..6172edc
--- /dev/null
+++ b/Tests.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0fb1e9ec4378f744cb0233114052af87
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Tests/Editor.meta b/Tests/Editor.meta
new file mode 100644
index 0000000..0bad4ff
--- /dev/null
+++ b/Tests/Editor.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cb93843d5ed2538478b76c9e793ec440
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/BCP/Scripts/Tests/Editor/BcpMessageTests.cs b/Tests/Editor/BcpMessageTests.cs
similarity index 100%
rename from Assets/BCP/Scripts/Tests/Editor/BcpMessageTests.cs
rename to Tests/Editor/BcpMessageTests.cs
diff --git a/Tests/Editor/BcpMessageTests.cs.meta b/Tests/Editor/BcpMessageTests.cs.meta
new file mode 100644
index 0000000..ce2c0ab
--- /dev/null
+++ b/Tests/Editor/BcpMessageTests.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1a15f8c878d196543ba5f9e1ae883042
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Tests/Editor/org.missionpinball.unity-bcp-server.Editor.Tests.asmdef b/Tests/Editor/org.missionpinball.unity-bcp-server.Editor.Tests.asmdef
new file mode 100644
index 0000000..d087139
--- /dev/null
+++ b/Tests/Editor/org.missionpinball.unity-bcp-server.Editor.Tests.asmdef
@@ -0,0 +1,19 @@
+{
+ "name": "MissionPinball.UnityBcpServer.Editor.Tests",
+ "rootNamespace": "",
+ "references": [
+ "UnityEditor.TestRunner",
+ "MissionPinball.UnityBcpServer"
+ ],
+ "includePlatforms": [
+ "Editor"
+ ],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": true,
+ "defineConstraints": [],
+ "versionDefines": [],
+ "noEngineReferences": false
+}
\ No newline at end of file
diff --git a/Tests/Editor/org.missionpinball.unity-bcp-server.Editor.Tests.asmdef.meta b/Tests/Editor/org.missionpinball.unity-bcp-server.Editor.Tests.asmdef.meta
new file mode 100644
index 0000000..6a5393b
--- /dev/null
+++ b/Tests/Editor/org.missionpinball.unity-bcp-server.Editor.Tests.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 1f12fe61ec6324545a2c3ad8fc0e1ba8
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..5dde9ff
--- /dev/null
+++ b/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "org.missionpinball.unity-bcp-server",
+ "version": "1.4.0",
+ "displayName": "Unity BCP Server",
+ "description": "Backbox Control Protocol (BCP) Server for Unity",
+ "unity": "2018.1",
+ "license": "MIT"
+}
\ No newline at end of file
diff --git a/package.json.meta b/package.json.meta
new file mode 100644
index 0000000..8b99821
--- /dev/null
+++ b/package.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: c3352b9d129ea964fa951e287b58c6e3
+PackageManifestImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant: