예제 #1
0
    public void ElevatorMethod3() // SEQUENCE 30
    {
        EnterGroundElevator -= ElevatorMethod3;
        groundFloorElevatorPanel1.CloseElevator();
        groundFloorElevatorPanel1.ChangeActiveState(false);

        groundFloorElevatorPanel2.ChangeActiveState(true);
        FindObjectOfType <PlayerController>().ChangeRootState(true);
    }
예제 #2
0
    public IEnumerator ElevatorMethod1() // SEQUENCE 20
    {
        ElevatorAfterSecondRoom -= ElevatorMethod1;
        AudioSource aSourcePlayer = FindObjectOfType <PlayerController>().gameObject.GetComponent <AudioSource>();

        // ROOTS THE PLAYER AND SHUTS THE DOOR
        FindObjectOfType <PlayerController>().ChangeRootState(true);
        thirdFloorElevatorPanel.CloseElevator();
        thirdFloorElevatorPanel.ChangeActiveState(false);
        yield return(new WaitForSeconds(4));

        // STARTS THE ELEVATOR
        aSourcePlayer.PlayOneShot(Sons.instance.ElevadorInicio, aSourcePlayer.volume);
        yield return(new WaitForSeconds(2.376f));

        aSourcePlayer.clip = Sons.instance.ElevadorMovimentaçao;
        aSourcePlayer.Play();

        // TELEPORTS THE PLAYER
        FindObjectOfType <PlayerController>().gameObject.transform.position = thirdFloorElevatorDestination.position;
        LightManager.instance.SetLightState(6, true);
        yield return(new WaitForSeconds(7));


        // STOPS THE ELEVATOR
        aSourcePlayer.Stop();
        aSourcePlayer.PlayOneShot(Sons.instance.ElevadorPara, aSourcePlayer.volume);
        yield return(new WaitForSeconds(2.064f));

        secondFloorElevatorPanel.ChangeActiveState(true);
        secondFloorElevatorPanel.OpenElevator();
        aSourcePlayer.clip = Sons.instance.MusicaPreenchimento1;
        aSourcePlayer.Play();

        FindObjectOfType <PlayerController>().ChangeRootState(false);
    }