예제 #1
0
    private void Die()
    {
        animator.SetBool("isRunning", false);
        animator.SetTrigger("Death");
        sfxc.playDeathSound();

        isDead = true;

        if (gameObject.CompareTag("Player"))
        {
            gfc.OnGameOver();
        }
        else if (gameObject.CompareTag("Boss"))
        {
            gfc.OnGameOver();
        }
        else
        {
            dropper.DropLoot();
        }

        StartCoroutine(DeleteObject(3));
    }