public void Disarm() { //Disarms the target preventing it from attacking for 3 seconds. PlayerAttack PA = FindObjectOfType <PlayerAttack>(); PA.isAttacking = true; PA.meleeWeapon.GetComponent <Collider>().enabled = true; HitBox hit = FindObjectOfType <HitBox>(); sword.SetBool("isSword1", true); hit.ChanageStatus(2); SwordParticle.SetActive(true); SwordParticle.GetComponent <TrailRenderer>().colorGradient = DisarmGradient; }
public void Rend() { //Slashes the target doing 10 bleed damage every 1 second for 6 seconds. PlayerAttack PA = FindObjectOfType <PlayerAttack>(); PA.isAttacking = true; PA.meleeWeapon.GetComponent <Collider>().enabled = true; HitBox hit = FindObjectOfType <HitBox>(); sword.SetBool("isSword1", true); hit.ChanageStatus(1); SwordParticle.SetActive(true); SwordParticle.GetComponent <TrailRenderer>().colorGradient = RendGradient; }
public void StopArrow() { playerAnimator.SetBool("isBowSkill", true); GameObject go = Instantiate(f_arrow, spawnPoint.position, spawnPoint.rotation); if (go == null) { return; } go.GetComponent <Rigidbody>().AddForce(spawnPoint.transform.forward * arrowForce, ForceMode.VelocityChange); HitBox hit = FindObjectOfType <HitBox>(); hit.ChanageStatus(4); }