コード例 #1
0
 static public int Stop(IntPtr l)
 {
     try {
         UnityEngine.Playables.PlayableDirector self = (UnityEngine.Playables.PlayableDirector)checkSelf(l);
         self.Stop();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #2
0
 static int Stop(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.Playables.PlayableDirector obj = (UnityEngine.Playables.PlayableDirector)ToLua.CheckObject <UnityEngine.Playables.PlayableDirector>(L, 1);
         obj.Stop();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #3
0
ファイル: EndSequence.cs プロジェクト: Fornan-II/FeastWeek
    private IEnumerator Anim()
    {
        musicManager.StopImmediately();
        musicManager.FadeInNewSong(
            deathBlobMusic,
            Mathf.Max(2f, alembicBlobStartTime - 2f),
            true
            );

        // Just disable pausing during end sequence so the music is timed well enough
        PauseManager.Instance.PausingAllowed = false;

        StartCoroutine(RunScreenShakeCoroutine(initialScreenshakeAnimation));

        bool  directorStarted = false;
        float animLength      = Util.AnimationCurveLengthTime(ghostBonesAnimation);

        for (float timer = 0.0f; timer < animLength && !(_deathBlobCollided); timer += Time.deltaTime)
        {
            ghostBones.material.SetFloat("_Extrusion", ghostBonesAnimation.Evaluate(timer));
            if (timer >= alembicBlobStartTime && !directorStarted)
            {
                deathBlob.SetActive(true);
                director.Play();
                blobDetection.gameObject.SetActive(true);
                blobDetection.StartDetection();
            }
            yield return(null);
        }

        // OR together any other bools for waiting
        while (!_deathBlobCollided)
        {
            yield return(null);
        }

        // Check which of the changed bools triggered and what ending to show.
        if (_deathBlobCollided)
        {
            MainCamera.Effects.SetFadeColor(Color.black);
            MainCamera.Effects.CrossFade(0f, true);
            playerController.ReleaseControl();
            director.Stop();
            deathBlob.SetActive(false);
            castleDoor.CloseDoor();
            yield return(MusicCustomFadeOut());

#if false
            deathAnimation.SetTrigger("PlayAnimation");
            deathView.RequestView();
            MainCamera.Effects.SetColorInvert(true);
            MainCamera.Effects.CrossFade(5f, false);

            yield return(new WaitForSeconds(12f));

            MainCamera.Effects.CrossFade(5f, true);

            yield return(new WaitForSeconds(6f));

            GlobalData.HasCompletedGame = true;
            UnityEngine.SceneManagement.SceneManager.LoadScene(0);
#else
            UnityEngine.SceneManagement.SceneManager.LoadScene(2);
            PauseManager.Instance.PausingAllowed = true;
#endif
        }
    }