Example #1
0
        private void Start()
        {
            MenuManager.Init(this);

            if (!DebugDisableBackgroundMusic)
            {
                AudioManager.Play(BackgroundMusicAudioClip, AudioCategory.Music, 0.7f, true);
            }
        }
        private void Start()
        {
            MenuManager.Init(this);

            VideoPlayer videoPlayer = VideoObject.GetComponent <VideoPlayer>();

            videoPlayer.loopPointReached += _ => PerformPostVideo();

            videoPlayer.SetDirectAudioVolume(0, AudioManager.GetCategoryVolume(AudioCategory.Music) * 0.4f);
            videoPlayer.SetDirectAudioVolume(1, AudioManager.GetCategoryVolume(AudioCategory.Music) * 0.4f);
            videoPlayer.Play();
        }
Example #3
0
        private void Start()
        {
            if (SceneManager.GetActiveScene().name == "Hub")
            {
                MenuManager.Init(this);

                AudioManager.Play(HubLoopAudioClip, AudioCategory.Music, 0.4f, true);

                if (Persistent.CollectedKeyCardCount >= Persistent.RequiredKeyCardCount && !Persistent.HadEnoughCards)
                {
                    MenuManager.ShowDialogue(GameObject.Find("CardCountDisplay").GetComponent <DialogueContentBehaviour>().DialogueContent);
                    Persistent.HadEnoughCards = true;
                }
            }
            else if (SceneManager.GetActiveScene().name == "Gameplay")
            {
                MenuManager.Init(this);

                // Bug causing audio to not be played first time it is called, so doing redundant call.
                AudioManager.Play(GameplayLoopAudioClip, AudioCategory.Music, 0.0f);
                AudioManager.Play(GameplayLoopAudioClip, AudioCategory.Music, 0.4f, true);
            }
        }