Exemplo n.º 1
0
 public override void Interact()
 {
     if (isEnabled)
     {
         timeline.Play();
         base.Interact();
     }
 }
    private void OnTriggerEnter(Collider collider)
    {
        if (collider.CompareTag("Player"))
        {
            m_EnteredPlayerCount++;
        }

        if (m_EnteredPlayerCount == m_DoorClosePlayerCount)
        {
            m_Director.Play();
        }
    }
Exemplo n.º 3
0
    private void InitializeCameraTransition()
    {
        if (OnCutScene != null)
        {
            print("Inicializando barras");
            OnCutScene();
        }



        earthquakePlayable.Play();
    }
Exemplo n.º 4
0
 protected override void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         OnSoundActivate?.Invoke(clipToSend);
         if (subtitleTimeline != null)
         {
             subtitleTimeline.Play();
         }
         if (!playAgain)
         {
             this.gameObject.SetActive(false);
         }
     }
 }
Exemplo n.º 5
0
 private void OnTriggerStay2D(Collider2D collision)
 {
     if (!isPlayerWhitSword)
     {
         if (collision.gameObject.tag == "Player" && TextToAmunition.wasReading)
         {
             pressText.SetActive(true);
         }
         if (collision.gameObject.tag == "Player" && TextToAmunition.wasReading && Input.GetKey(KeyCode.E))
         {
             playbel.Play();
             isPlayerWhitSword = true;
             Invoke("ChangePlayer", 2.9f);
         }
     }
 }
Exemplo n.º 6
0
 static public int Play(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.Playables.PlayableDirector self = (UnityEngine.Playables.PlayableDirector)checkSelf(l);
             self.Play();
             pushValue(l, true);
             return(1);
         }
         else if (argc == 2)
         {
             UnityEngine.Playables.PlayableDirector self = (UnityEngine.Playables.PlayableDirector)checkSelf(l);
             UnityEngine.Playables.PlayableAsset    a1;
             checkType(l, 2, out a1);
             self.Play(a1);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 3)
         {
             UnityEngine.Playables.PlayableDirector self = (UnityEngine.Playables.PlayableDirector)checkSelf(l);
             UnityEngine.Playables.PlayableAsset    a1;
             checkType(l, 2, out a1);
             UnityEngine.Playables.DirectorWrapMode a2;
             checkEnum(l, 3, out a2);
             self.Play(a1, a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 7
0
    static int Play(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                UnityEngine.Playables.PlayableDirector obj = (UnityEngine.Playables.PlayableDirector)ToLua.CheckObject <UnityEngine.Playables.PlayableDirector>(L, 1);
                obj.Play();
                return(0);
            }
            else if (count == 2)
            {
                UnityEngine.Playables.PlayableDirector obj  = (UnityEngine.Playables.PlayableDirector)ToLua.CheckObject <UnityEngine.Playables.PlayableDirector>(L, 1);
                UnityEngine.Playables.PlayableAsset    arg0 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 2);
                obj.Play(arg0);
                return(0);
            }
            else if (count == 3)
            {
                UnityEngine.Playables.PlayableDirector obj  = (UnityEngine.Playables.PlayableDirector)ToLua.CheckObject <UnityEngine.Playables.PlayableDirector>(L, 1);
                UnityEngine.Playables.PlayableAsset    arg0 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 2);
                UnityEngine.Playables.DirectorWrapMode arg1 = (UnityEngine.Playables.DirectorWrapMode)ToLua.CheckObject(L, 3, typeof(UnityEngine.Playables.DirectorWrapMode));
                obj.Play(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Playables.PlayableDirector.Play"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Exemplo n.º 8
0
 public void PlayScene()
 {
     cutscene.Play();
 }
Exemplo n.º 9
0
    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
        }
    }