예제 #1
0
    void OnTriggerExit(Collider other)
    {
        if (!initialExit && other.tag == "Player")
        {
            initialExit = true;
            VideoPlayer videoPlayer = FindObjectOfType <VideoPlayer>();
            videoPlayer.Stop();
            AudioSource audio = videoPlayer.GetComponentInParent <AudioSource>();
            audio.Stop();

            LevelController controller = FindObjectOfType <LevelController>();
            controller.SetGuideText("Find your exercise and collect the right molecules");
            // The time has come! Start the music.
            controller.PlayBackgroundMusic();

            gameStarted = true;
            lastRoutine = StartCoroutine(Timer());
        }
    }