Example #1
0
    // TODO(@rudra): Unreachable code, remove

    /*
     * IEnumerator OpenDoorWhenCollected()
     * {
     *  // TODO(@rudra): NONONONONONONONONONONONONONO
     *  // When you reach it, it's gone, plus HORROR
     *  yield return new WaitForSeconds(10.0f);
     *
     *  GamePlayState = GAMEPLAY_STATE.FIRST_COLLECTED;
     *
     *  if (DoorState == DOOR_STATE.DOOR_CLOSED && CurrentPlayerRoom == PLAYER_CURRENT_ROOM.ROOM_2)
     *  {
     *      OpenDoor();
     *  }
     * }
     */

    IEnumerator LightOffSequence()
    {
        //CloseDoor();

        yield return(new WaitForSeconds(1.5f));

        for (u32 Index = 0;
             Index < AllLightsToTurnOffAfterLever.Length;
             ++Index)
        {
            AllLightsToTurnOffAfterLever[Index].SetActive(false);
        }
        GM_AudioSource.clip = PowerDownAudio;
        GM_AudioSource.Play();
        ELEKTRICITY.Stop();

        FirstCoffinLight.SetActive(false);
        SecondCoffinLight.SetActive(false);
        ThirdCoffinLight.SetActive(false);

        AudioSource RightDoorAudio = RightDoor.GetComponent <AudioSource>();

        RightDoorAudio.loop = false;
        RightDoorAudio.Stop();

        GamePlayState = GAMEPLAY_STATE.LEVER_ACTIVATED;

        yield return(new WaitForSeconds(5.0f));

        GM_AudioSource.clip = VCR_Low;
        GM_AudioSource.loop = true;
        GM_AudioSource.Play();
    }
Example #2
0
    IEnumerator WaitAndActivateThirdCoffin()
    {
        yield return(new WaitForSeconds(10.0f));

        SecondCoffinLight.SetActive(false);
        SecondCoffinActivated = false;
        ThirdCoffinActivated  = true;
        ThirdCoffinLight.SetActive(true);
    }
Example #3
0
    IEnumerator WaitAndActivateOpenDoor()
    {
        // TODO(@rudra): Find a better way, too tired now
        StartedAlready = true;

        yield return(new WaitForSeconds(10.0f));

        ThirdCoffinLight.SetActive(false);
        ThirdCoffinActivated = false;

        yield return(new WaitForSeconds(10.0f));

        GamePlayState = GAMEPLAY_STATE.FIRST_COLLECTED;

        if (DoorState == DOOR_STATE.DOOR_CLOSED && CurrentPlayerRoom == PLAYER_CURRENT_ROOM.ROOM_2)
        {
            OpenDoor();
        }
    }
Example #4
0
    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);
    }
Example #5
0
    // 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
    }