Esempio n. 1
0
    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;
    }
Esempio n. 2
0
    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;
    }
Esempio n. 3
0
    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);
    }