void BasicStrike() { HitboxScript hitboxScript = FindObjectOfType <HitboxScript>(); Debug.Log("Attacking with a " + comboLevel + " Combo!"); if (comboLevel > 1) { hitboxScript.setDamage(30); } else { hitboxScript.setDamage(25); } anim.SetTrigger("BasicAttack"); //attack animation hitboxScript.Attack(false); //generates the hitbox attackInitiated = false; }
void ChargedStrike() { HitboxScript hitboxScript = FindObjectOfType <HitboxScript>(); if (chargeLevel == 1) { hitboxScript.setDamage(30); } else if (chargeLevel == 2) { hitboxScript.setDamage(50); } else if (chargeLevel == 3) { hitboxScript.setDamage(100); } anim.SetTrigger("SpinAttack"); //attack animation hitboxScript.Attack(true); //generates the hitbox attackInitiated = false; }