private void impactBot(BotController opponent, AnimationClip attackAnimation) { // Impact bool attackQualifies = GetComponent<Animation>()[attackAnimation.name].time > GetComponent<Animation>()[attackAnimation.name].length * impactTime && GetComponent<Animation>()[attackAnimation.name].time < GetComponent<Animation>()[attackAnimation.name].length * impactEndTime; if (attackQualifies && !impacted && this.inRangeWithPosition(opponent.transform.position)) { opponent.knockbackFrom(transform.forward); impacted = false; Debug.Log("hit bot!"); } }