IEnumerator WaitAndActivateThirdCoffin() { yield return(new WaitForSeconds(10.0f)); SecondCoffinLight.SetActive(false); SecondCoffinActivated = false; ThirdCoffinActivated = true; ThirdCoffinLight.SetActive(true); }
IEnumerator WaitAndStartCoffinsAndInitLever() { yield return(new WaitForSeconds(5.0f)); FirstCoffinLight.SetActive(true); SecondCoffinLight.SetActive(true); ThirdCoffinLight.SetActive(true); yield return(new WaitForSeconds(10.0f)); AudioSource RightDoorAudio = RightDoor.GetComponent <AudioSource>(); RightDoorAudio.clip = RightDoorThumping; RightDoorAudio.loop = true; RightDoorAudio.Play(); yield return(new WaitForSeconds(10.0f)); Lever.transform.parent.gameObject.SetActive(true); }
// Start is called before the first frame update void Start() { ProgramMode = Program_Mode.START_SCREEN; DoorState = DOOR_STATE.DOOR_CLOSED; GamePlayState = GAMEPLAY_STATE.INIT; ReadingState = READING_STATE.NONE; DoorAudioSource = MiddleDoor.GetComponent <AudioSource>(); Lever.transform.parent.gameObject.SetActive(false); GM_AudioSource = GetComponent <AudioSource>(); OtherNotesProgressHash = 0; GameCompleteHash = (1 << (i32)Letter.Tag.OTHER_1) | (1 << (i32)Letter.Tag.OTHER_2) | (1 << (i32)Letter.Tag.OTHER_3) | (1 << (i32)Letter.Tag.OTHER_4); Human.SetActive(false); BlackScreen.SetActive(false); Credits.SetActive(false); GameMixer.GetFloat("GM_Volume", out VCR_Current_Volume); VCR_Target_Volume = VCR_Current_Volume; T = 0.0f; FirstCoffinActivated = false; SecondCoffinActivated = false; ThirdCoffinActivated = false; FirstCoffinLight.SetActive(false); SecondCoffinLight.SetActive(false); ThirdCoffinLight.SetActive(false); CoffinMinDistance = 14.0f; StartedAlready = false; #if IGNORED GameMixer.GetFloat("GM_Volume", out OriginalTrainVolume); GameMixer.SetFloat("GM_Volume", OriginalTorchSound); #endif }