private void Update() { if (_isAttacking) { _attackController.Attack(); } }
private void Update() { if (!_attackController.CanAttack) { return; } attackControllerTransform.rotation = Quaternion.Euler(0f, 0f, GetAttackControllerRotation()); _attackController.Attack(); }
public override void Execute() { timeBetweenAttacks += Time.deltaTime; if (IsAttackPressed && !KeyboardPauseCommand.isPaused) { if (timeBetweenAttacks >= attack.AttackSpeed) { timeBetweenAttacks = 0.0f; attackController.Attack(); Debug.Log("Attack Pressed"); } IsAttackPressed = false; } }