コード例 #1
0
 private void OnExitEditMode()
 {
     eventBuilderExit.Play();
     CoroutineStarter.Start(eventBuilderMusic.FadeOut(MUSIC_FADE_OUT_TIME_ON_EXIT));
     if (HUDController.i.builderInWorldMainHud != null)
     {
         HUDController.i.builderInWorldMainHud.OnCatalogItemSelected -= OnCatalogItemSelected;
     }
 }
コード例 #2
0
    public void ExitEditMode()
    {
        eventBuilderExit.Play();
        CoroutineStarter.Start(eventBuilderMusic.FadeOut(MUSIC_FADE_OUT_TIME_ON_EXIT));
        if (HUDController.i.builderInWorldMainHud != null)
        {
            HUDController.i.builderInWorldMainHud.OnCatalogItemSelected -= OnCatalogItemSelected;
        }

        gameObject.SetActive(false);
    }
コード例 #3
0
 private void TutorialActive_OnChange(bool current, bool previous)
 {
     if (current)
     {
         tutorialHasBeenEnabled = true;
         TryPlayingMusic();
     }
     else
     {
         if (tutorialMusic.source.isPlaying)
         {
             fadeOut = CoroutineStarter.Start(tutorialMusic.FadeOut(3f));
         }
         tutorialHasBeenEnabled = false;
     }
 }
    void OnSetAvatarEditorVisibility(bool visible)
    {
        AudioScriptableObjects.listItemAppear.ResetPitch();

        if (visible)
        {
            if (musicFadeOut != null)
            {
                StopCoroutine(musicFadeOut);
                StartCoroutine(eventMusic.FadeIn(1f));
            }

            if (!eventMusic.source.isPlaying)
            {
                eventMusic.Play();
            }

            view.eyeColorSelector.OnColorChanged  += OnEyeColorChanged;
            view.skinColorSelector.OnColorChanged += OnSkinColorChanged;
            view.hairColorSelector.OnColorChanged += OnHairColorChanged;
            view.OnAvatarAppear += OnAvatarAppear;
        }
        else
        {
            musicFadeOut = eventMusic.FadeOut(2f);
            StartCoroutine(musicFadeOut);

            view.eyeColorSelector.OnColorChanged  -= OnEyeColorChanged;
            view.skinColorSelector.OnColorChanged -= OnSkinColorChanged;
            view.hairColorSelector.OnColorChanged -= OnHairColorChanged;
            view.OnAvatarAppear -= OnAvatarAppear;
        }
    }