private IEnumerator DoTheMostThings()
    {
        //opening dialog
        yield return(new WaitForSeconds(0.2f));

        DialogueController = FindObjectOfType <DialogueController>();
        yield return(WaitForDialog(openingDialog));

        MinigameStation[]      stations  = FindObjectsOfType <MinigameStation>();
        List <MinigameListing> minigames = new List <MinigameListing>();

        foreach (MinigameListing[] mlArray in stations.Select(x => x.minigames))
        {
            foreach (MinigameListing ml in mlArray)
            {
                minigames.Add(ml);
            }
        }
        yield return(new WaitUntil(() => minigames.Where(x => !x.success).Count() == 0));

        Debug.Log("past all minigames");
        yield return(new WaitUntil(() => corpse));

        yield return(WaitForDialog(labSceneComplete));

        //transition to court scene here
        LoadScreen.LoadNext();
    }
Exemplo n.º 2
0
 public void MoveScene()
 {
     LoadScreen.LoadNext();
 }
    private IEnumerator DoTheEverything()
    {
        //opening dialog
        yield return(new WaitForSeconds(0.2f));

        photographGameContainer.SetActive(false);

        DialogueController = FindObjectOfType <DialogueController>();
        yield return(WaitForDialog(openingDialog));


        //initial inspections of all objects
        InspectInitial[] ii = FindObjectsOfType <InspectInitial>();
        foreach (var item in ii)
        {
            item.enabled = true;
        }
        yield return(new WaitUntil(() => (ii.Where(x => x.enabled).Count() == 0) &&
                                   fpsplayer.enabled));

        //wait for end of initial inspection complete dialog
        yield return(WaitForDialog(initialInspectionComplete));


        //play the game and tag things
        photographGameContainer.SetActive(true);
        foreach (var item in FindObjectsOfType <Taggable>())
        {
            item.enabled = true;
        }
        photographGame.InteractBegin();
        print("waiting for photo game to end");
        yield return(new WaitUntil(() => photographGame.GetComponent <PictureMinigame>().win));

        print("photo game end");

        //end of minigame dialog
        yield return(WaitForDialog(endOfPhotoGame));


        //time for detailed inspections of the body
        //f**k unity for making me do this differently than FindObjectsOfType<> because it doesn't return inactive objects
        foreach (var item in detailedBodyInspection)
        {
            item.gameObject.SetActive(true);
        }
        //print("waiting for detailed inspection of body");
        yield return(new WaitUntil(() => detailedBodyInspection.Where(x => x.gameObject.activeSelf).Count() == 0));

        yield return(new WaitForSeconds(0.1f));

        yield return(new WaitUntil(() => fpsplayer.enabled));

        //print("detailed inspection of body end");

        //finished inspecting body
        yield return(WaitForDialog(endOfBodyInspection));

        //now detailed inspect the other things
        InspectDetailedOther[] ido = FindObjectsOfType <InspectDetailedOther>();
        //Playable dumpster = FindObjectOfType<Playable>();
        //dumpster.enabled = true;
        foreach (var item in ido)
        {
            item.enabled = true;
            if (item.GetComponent <Playable>())
            {
                StartCoroutine(dumpsterWhatever(item));
            }
        }
        print("waiting for detailed inspection of other");
        yield return(new WaitUntil(() => (ido.Where(x => x.enabled).Count() == 0) && FindObjectOfType <DumpsterMiniGame>().win));

        print("detailed inspection of other end");

        yield return(WaitForDialog(endOfSceneDialog));

        //exit scene here
        LoadScreen.LoadNext();
    }
 public void PlayGame()
 {
     LoadScreen.LoadNext();
 }