Ejemplo n.º 1
0
    private void OnDefeated()
    {
        if (defeated || shieldsDown)
        {
            return;
        }

        gameAudio.SetEffectsPlayEnabled(false);
        gameAudio.Fade(BackgroundAudio.FadeState.Out, 1, 7f);
        shieldAnimator.SetTrigger(DEFEATED_HASH);
        shieldsDown = true;
        gun.StopShooting();
        text.onTextAnimationFinished += PenetrateEgg;
        text.Show();
        text.AnimateText("The shields are down, we did it!");
    }