void AttackInput() { if (Input.GetButton(KeyAttack)) { mBox.Attack(); } }
void GoAttack() { if (attackCDCount < attackCD) { return; } if (chasing != null && isChase) { float d = Vector3.Distance(chasing.transform.position, transform.position); if (d <= 0.8f) { Debug.Log("Attack"); monster.Attack(); attackCDCount = 0; } } }