Exemple #1
0
    public void StartDying()
    {
        if (isDying)
        {
            return;
        }

        isDying = true;
        if (dyingSequence != null && dyingSequence.IsActive())
        {
            dyingSequence.Kill();
        }
        dyingSequence = DOTween.Sequence();

        AudioManager.Instance.SwitchReverb(true, false, dyingSequence, deathDelay);
        lightsManager.SwitchLights(dyingSequence, false, deathDelay);
        dyingSequence.OnComplete(Die);
    }