private void FrontalAttack() { if (_attackPressed) { _attackPressed = false; _attack.Strike(); } }
public override void Attack(Transform target, bool agentEnabled) { if (target) { if (Vector3.Distance(transform.position, target.position) <= _attackRange - _attackMargin) { if (_attack && !_damageDone) { // HIT if (_attack.Strike()) { _damageDone = true; } } } } /*if ( _agent && !agentEnabled ) { * _agent.SetDestination( transform.position ); * }*/ }