public void Dispose() { startGameSignal.RemoveListener(OnStartGame); toMenuSignal.RemoveListener(OnToMenu); countdownFinishedSignal.RemoveListener(OnCountdownFinishedSignal); objectFellOffFloorSignal.RemoveListener(OnObjectFellOffFloor); restartLevelSignal.RemoveListener(OnRestartLevel); }
private void OnDestroy() { startGameSignal.RemoveListener(OnStartGame); gameOverSignal.RemoveListener(OnGameOverSignal); restartLevelSignal.RemoveListener(OnRestartLevelSignal); toMenuSignal.RemoveListener(OnToMenuSignal); mortaShootSignal.RemoveListener(OnMortaShoot); allBulletsShotSignal.RemoveListener(OnAllBulletsShot); }