コード例 #1
0
    private void Start()
    {
        player          = FlameKeeper.Get().levelController.GetPlayer();
        particleSystems = new List <ParticleSystem>(GetComponentsInChildren <ParticleSystem>());

        WhiteOutBehaviour whiteOutBehaviour = whiteOutAnimator.GetBehaviour <WhiteOutBehaviour>();

        whiteOutBehaviour.totemController = this;

        WhiteInBehaviour whiteInBehaviour = whiteOutAnimator.GetBehaviour <WhiteInBehaviour>();

        whiteInBehaviour.totemController = this;

        if (startWhite)
        {
            whiteOutAnimator.SetBool("StartWhite", true);
            whiteOutAnimator.SetBool("WhiteIn", false);
            whiteOutAnimator.SetBool("WhiteOut", true);

            player.DisableInput();

            if (!FlameKeeper.Get().levelController.CutscenesDisabled() && startingCutscene != null && startingCamera != null)
            {
                startingCamera.Priority = 100; // Start on the cutscene camera, but don't play it just yet
            }
        }

        foreach (ParticleSystem particleSystem in particleSystems)
        {
            particleSystem.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear);
        }
    }
コード例 #2
0
 private void OnTriggerEnter(Collider other)
 {
     FlameKeeper.Get().dataminingController.StopTrackingScene();
     if (other.CompareTag(StringConstants.Tags.Player))
     {
         player.DisableInput();
         player.MoveToPoint(endPoint.position, OnPlayerFinishMove);
     }
 }
コード例 #3
0
    IEnumerator Freeze()
    {
        yield return(new WaitForSeconds(0.1f));

        player = FlameKeeper.Get().levelController.GetPlayer();
        player.DisableInput();
        yield return(new WaitForSeconds(duration));

        player.EnableInput();
    }
コード例 #4
0
    IEnumerator OnFinish()
    {
        player.DisableInput();
        foreach (UnityEvent events in eventsToPlay)
        {
            if (events != null)
            {
                events.Invoke();
            }
        }
        yield return(new WaitForSeconds(waitTime));

        foreach (UnityEvent events in eventsToPlayOnCutsceneEnd)
        {
            if (events != null)
            {
                events.Invoke();
            }
        }
        player.GetComponent <PlayerControllerSimple>().EnableInput();
    }
コード例 #5
0
    void Start()
    {
        shouldTransitionIn = !FlameKeeper.Get().levelController.CutscenesDisabled();
        player             = FlameKeeper.Get().levelController.GetPlayer();

        TutorialFadeStateBehaviour tutorialFadeBehaviour = fadeInAnimator.GetBehaviour <TutorialFadeStateBehaviour>();

        tutorialFadeBehaviour.tutorialTransition = this;

        if (!shouldTransitionIn)
        {
            overlayImage.color = Color.clear;
            fadeInAnimator.SetBool("Skip", true);
        }
        else
        {
            overlayImage.color = Color.black;
            player.DisableInput();
            startingCamera.Priority = 100; // Start on the cutscene camera, but don't play it just yet
            fadeInAnimator.SetBool("Start", true);
        }
    }