Esempio n. 1
0
    public void Death()
    {
        if (playerScore == "Player1")
        {
            MatchStart.p2Score++;
            MatchStart.NextRound();
        }
        else
        {
            MatchStart.p1Score++;
            MatchStart.NextRound();
        }

        winnerScript.ShowWinningFx();
        AudioS.clip = punchHit;
        AudioS.Play();
        Compliment();
        bDead = true;
        Destroy(hitBox);
        Destroy(attackVolumeRight);
        Destroy(attackVolumeLeft);
        Destroy(this);
        rb.isKinematic = false;
        rb.AddForce(transform.forward * -5000f);
        anim.SetBool("isDead", true);
    }