Esempio n. 1
0
    private void HandleBossDeath()
    {
        // Stop moving the boss.
        StopCoroutine(bossMoveCoroutine);

        AudioManager.Instance.PlayAudioClipIfExists(AudioType.BossDeath);
        Invulnerable = true;
        currentSpell.EndSpell();

        HandleItemSpawning();

        // Invoke delegates if needed.
        if (onBossDeath != null)
        {
            onBossDeath();
        }

        if (onSpellEnd != null)
        {
            onSpellEnd();
        }

        SpawnManager.Instance.BossFight = false;

        // Reward for defeating boss.
        GameManager.Instance.AddPoints(2000);
        // Play the death particles.
        deathParticleSystem.PlayParticleSystem();
    }