private void OnFightBegin(FightBeginSignal signal) { _enemyHealth.gameObject.SetActive(true); _enemyHealth.SetLookAt(signal.reciever.transform); _enemyToFollow = signal.reciever; _enemyMaxHealth = signal.reciever.CurrentStats.currentHealth; _enemyHealthText.text = _enemyMaxHealth + " / " + _enemyMaxHealth; _playerColldownAttack.gameObject.SetActive(true); _playerColldownAttack.SetLookAt(signal.sender.transform); _cooldownText.text = "0,0"; }
private void OnFightBegin(FightBeginSignal signal) { if (signal.reciever != this) { return; } _player = signal.sender; if (_player == null) { return; } _attackDelay = 1f; StartCoroutine(DoDamageCoroutine(_player)); }