Esempio n. 1
0
    public void Break()
    {
        if (active && boss != null)
        {
            active = false;

            boss.UpdateCrystal();

            // Separamos al hijo del padre
            // Llamamos a Animation de "EnemyDeathAnim"
            if (anim != null)
            {
                AudioManager.instance.Play(AudioManager.ESounds.CrystalBreak);
                anim.SetBool("Broken", true);
                child.SetParent(null);
            }
            Destroy(this.gameObject);
        }
    }