public void GetSignalFromRegistryTest() { TestSignal testSignal; Signals.Get(out testSignal); Assert.NotNull(testSignal); }
private void Awake() { Signals.Get(out loadLevelSignal); OnLoadLevel(gameData.CurrentLevel); loadLevelSignal.AddListener(OnLoadLevel); }
public void SignalRegistryClearTest() { Signals.Get <TestSignal>(); Assert.IsTrue(Signals.Count == 1); Signals.Clear(); Assert.IsTrue(Signals.Count == 0); }
private void Awake() { signal = Signals.Get <StressTestSignal>(); listeners = new List <DebugListener>(); for (int i = 0; i < numListener; i++) { listeners.Add(new DebugListener(i, signal)); } SubscribeListeners(); }
private void Awake() { Signals.Get(out signal); listeners = new List <DebugListener>(); for (int i = 0; i < numListener; i++) { listeners.Add(new DebugListener(i, signal, verbose)); } SubscribeListeners(); }
public void SignalRegistryGetMethodsTest() { Signals.Clear(); TestSignal testSignal0; TestSignal testSignal1; TestSignal testSignal2; testSignal0 = Signals.Get <TestSignal>(); Signals.Get(out testSignal1); testSignal2 = (TestSignal)Signals.Get(typeof(TestSignal)); Assert.IsTrue(testSignal0 == testSignal1); Assert.IsTrue(testSignal0 == testSignal2); }
private void Awake() { Signals.Get(out startGameSignal); Signals.Get(out gameOverSignal); Signals.Get(out restartLevelSignal); Signals.Get(out toMenuSignal); Signals.Get(out mortaShootSignal); Signals.Get(out allBulletsShotSignal); startGameSignal.AddListener(OnStartGame); gameOverSignal.AddListener(OnGameOverSignal); restartLevelSignal.AddListener(OnRestartLevelSignal); toMenuSignal.AddListener(OnToMenuSignal); mortaShootSignal.AddListener(OnMortaShoot); allBulletsShotSignal.AddListener(OnAllBulletsShot); }
public void Initialize() { currentState = GameState.Menu; levelListAsset.ResetIndex(); Signals.Get(out startGameSignal); Signals.Get(out gameOverSignal); Signals.Get(out toMenuSignal); Signals.Get(out countdownFinishedSignal); Signals.Get(out objectFellOffFloorSignal); Signals.Get(out restartLevelSignal); startGameSignal.AddListener(OnStartGame); toMenuSignal.AddListener(OnToMenu); countdownFinishedSignal.AddListener(OnCountdownFinishedSignal); objectFellOffFloorSignal.AddListener(OnObjectFellOffFloor); restartLevelSignal.AddListener(OnRestartLevel); }
public void DrawSignalDetailView() { GUILayout.BeginVertical(); if (instance == null) { instance = Signals.Get(type) as ASignal; if (instance == null) { GUILayout.Label("Only signals derived from ASignal supported"); return; } } var indexObject = currentIndexField.GetValue(instance); currentIndex = indexObject is int?(int)indexObject : 0; var stateObject = stateField.GetValue(instance); state = stateObject is ASignal.State ? (ASignal.State)stateObject : ASignal.State.Idle; DrawHeader(); GUILayout.Space(24f); DrawDispatchPropertyFields(); DrawButtons(); GUILayout.Space(24f); DrawLogs(); GUILayout.Space(24f); DrawListeners(); GUILayout.EndVertical(); }
public void GameOverSuccess() { Signals.Get <GameOverSignal>().Dispatch(true); }
private void Awake() { Signals.Get(out basicExampleSignal); SubscribeListeners(); }
private void Awake() { exampleSignal = Signals.Get <BasicExampleSignal>(); SubscribeListeners(); }
public void TriggerAllBulletsShot() { Signals.Get <AllBulletsShotSignal>().Dispatch(); }
public void TriggerCountdownFinished() { Signals.Get <CountdownFinishedSignal>().Dispatch(); }
public void TriggerExplosion() { Signals.Get <TriggerExplosionSignal>().Dispatch(); }
public void ToMenu() { Signals.Get <ToMenuSignal>().Dispatch(); }
public void RestartLevel() { Signals.Get <RestartLevelSignal>().Dispatch(); }
private void Awake() { Signals.Get(out remainingItemsSignal); remainingItemsSignal.AddListener(OnRemainingItems); }
public void StartGame() { Signals.Get <StartGameSignal>().Dispatch(); }
public void GameOverFailed() { Signals.Get <GameOverSignal>().Dispatch(false); }
public void InitialSetup() { callLog.Clear(); Signals.Clear(); Signals.Get(out signal); }