public InputSystem(IPlayerCamera camera, NewWalkTargetSignal walkTargetSignal, KeyPressedSignal keyPressedSignal, TargetAquiredSignal targetAquiredSignal, GameModel model ) { _playerCamera = camera; _walkTargetSignal = walkTargetSignal; _keyPressedSignal = keyPressedSignal; _targetAquiredSignal = targetAquiredSignal; _model = model; }
private void Init( GameStartSignal startSignal, GameOverSignal gameOverSignal, TargetAquiredSignal targetAquiredSignal, ShowLootPickerSignal lootPickerSignal ) { _targetAquiredSignal = targetAquiredSignal; _gameStartSignal = startSignal; _gameOverSignal = gameOverSignal; _lootPickerSignal = lootPickerSignal; _gameStartSignal += ShowUI; _gameOverSignal += HideUI; _targetAquiredSignal += UpdateEnemyHealthData; _lootPickerSignal += ShowLootPicker; }
void HandleTargetChanged(TargetAquiredSignal targetAquired) { var shouldFire = !targetAquired.TargetWasLost; if (shouldFire) { if (!_coroutine.IsValid) { _coroutine = CreateCoroutine(StartFiringProjectiles()); } } else { if (_coroutine.IsValid) { _coroutine.Stop(); _coroutine = AdvancedCoroutine.Empty; } } }
void OnDestroy() { _gameStartSignal -= ShowUI; _gameOverSignal -= HideUI; _targetAquiredSignal -= UpdateEnemyHealthData; }
void HandleTargetChanged(TargetAquiredSignal message) { Target = message.Target; enabled = message.Target != null; }
private void OnDestroy() { _targetAquireSignal -= Ability.Attack; }
private void Init(TargetAquiredSignal aquireSignal) { _targetAquireSignal = aquireSignal; _targetAquireSignal += Ability.Attack; }
private void HandleTargetChanged(TargetAquiredSignal newTarget) { Target = newTarget.Target; enabled = Target != null; }