private void enableHitbox() { enemiesHit = new List <GameObject> (0); hasHitEnemy = false; weapon.GetComponentInChildren <AttackCollider> ().attack = gameObject; weapon.GetComponentInChildren <Collider> ().enabled = true; weaponEffects.Activate(); }
private IEnumerator doGuardBreak() { enemiesHit = new List <GameObject>(0); weaponEffects.Activate(); hasHitEnemy = false; GameManager.playerAnimator.SetTrigger("isDoingGuardBreaker"); //triggerBox.transform.position = GameManager.player.GetComponent<Rigidbody> ().worldCenterOfMass + GameManager.player.transform.forward.normalized * positionInFrontPlayer; isFinished = false; yield return(new WaitForSeconds(timeToActivate)); weapon.GetComponentInChildren <AttackCollider> ().attack = gameObject; weapon.GetComponentInChildren <Collider> ().enabled = true; yield return(new WaitForSeconds(timeToDeactivate)); isFinished = true; weapon.GetComponentInChildren <AttackCollider> ().attack = null; weapon.GetComponentInChildren <Collider> ().enabled = false; weaponEffects.StopSmoothly(0.1f); }