|
|
|
|
|
|
inputReader.enableMouseControlCameraEvent += OnEnableMouseControlCamera; |
|
|
|
inputReader.disableMouseControlCameraEvent += OnDisableMouseControlCamera; |
|
|
|
|
|
|
|
if (_frameObjectChannel != null) |
|
|
|
_frameObjectChannel.OnEventRaised += OnFrameObjectEvent; |
|
|
|
|
|
|
|
if (_camShakeEvent != null) |
|
|
|
_camShakeEvent.OnEventRaised += () => impulseSource.GenerateImpulse(); |
|
|
|
_frameObjectChannel.OnEventRaised += OnFrameObjectEvent; |
|
|
|
_camShakeEvent.OnEventRaised += impulseSource.GenerateImpulse; |
|
|
|
|
|
|
|
_cameraTransformAnchor.Transform = mainCamera.transform; |
|
|
|
} |
|
|
|
|
|
|
inputReader.enableMouseControlCameraEvent -= OnEnableMouseControlCamera; |
|
|
|
inputReader.disableMouseControlCameraEvent -= OnDisableMouseControlCamera; |
|
|
|
|
|
|
|
if (_frameObjectChannel != null) |
|
|
|
_frameObjectChannel.OnEventRaised -= OnFrameObjectEvent; |
|
|
|
_frameObjectChannel.OnEventRaised -= OnFrameObjectEvent; |
|
|
|
_camShakeEvent.OnEventRaised -= impulseSource.GenerateImpulse; |
|
|
|
} |
|
|
|
|
|
|
|
private void OnEnableMouseControlCamera() |
|
|
|