Пример #1
0
    void OnTriggerEnter2D(Collider2D col)
    {
        Scene cs = SceneManager.GetActiveScene();

        if (cs.name != "FroggerLevel3")
        {
            audioSrc.PlayOneShot(levelUp);
            Debug.Log("Level up!");
            _freezer.FreezeAndNextScene();
        }
        else
        {
            audioSrc.PlayOneShot(winSound);
            Debug.Log("You win!");
            _freezer.FreezeAndEnd();
        }
    }