void Start()
    {
        dialogueWithGroundskeeperScript = Groundskeeper.GetComponent <DialogueWithGroundskeeper>();
        dialogueWithVanessaScript       = Vanessa.GetComponent <DialogueWithVanessa>();

        lockedWithNPC           = false;
        UhhhhMaybeYouShouldWait = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue/Player/UhhhhMaybeYouShouldWait");
        turulSFXScript          = turul.GetComponent <PlayTurulSFX>();
        TurulSingleSquawk       = FMODUnity.RuntimeManager.CreateInstance("event:/SFX/TurulSquawk");
        LockComment             = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/LockComment");
        StillMausoleumComment   = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/StillMausoleumComment");
        StillClockComment       = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/StillClockComment");
        BlankGraveComment       = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/GraveWithoutWordsComment");
        TreeOfLifeComment       = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/TreeOfLife");
        BangingMausoleumComment = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/BangingMausoleumComment");
        CreepyClockComment      = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/CreepyClockComment");
        FilledInGravesComment   = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/FilledInGravesComment");
        IgnoreTheGhostComment   = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/IgnoreTheGhostComment");

        obtainLighterFromCharlieComment = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue/Player/ObtainLighterComment");
        obtainFanFromVanessaComment     = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue/Player/ObtainFanComment");


        IHaveAShovel = FMODUnity.RuntimeManager.CreateInstance("event:/ItemInteractions/IHaveAShovel");

        lightScript     = lights.GetComponent <ProgressiveLights>();
        gateCloseScript = bathroomCutsceneHolder.GetComponent <TriggerGateClose>();

        waterBottleSlotSelectItemScript = waterBottleSlot.GetComponent <SelectItem>();
        inventoryScript = GetComponent <Inventory>();

        inventoryItemManagerScript = InventoryCanvas.GetComponent <InventoryItemManager>();

        LeaveForintOnTheGround = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/LeaveForintOnTheGround");
    }
    // Start is called before the first frame update
    void Start()
    {
        turulSFXScript = turul.GetComponent <PlayTurulSFX>();
        lightsScript   = lights.GetComponent <ProgressiveLights>();

        gateCloseScript = bathroomCutsceneTimeline.GetComponent <TriggerGateClose>();
        lockViewScript  = playerCamera.GetComponent <LockView>();

        catPuzzleLoopScript = catPuzzleLoopTriggerObject.GetComponent <PlayCatPuzzleLoop>();
    }
    // Start is called before the first frame update
    void Start()
    {
        doorScript   = door.GetComponent <DoorScript>();
        levelChanger = GameObject.Find("LevelChanger");
        if (!levelChanger)
        {
            Instantiate(activeStatusAudioManager);
            levelChanger = GameObject.Find("LevelChanger");
        }

        sceneManagementScript = levelChanger.GetComponent <SceneManagement>();

        Lights       = GameObject.Find("Lights");
        LightsScript = Lights.GetComponent <ProgressiveLights>();

        vanessaSaysOMGAfterGateCloses = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue/Vanessa/OMGTheGateClosed");
        shakeGateSound = FMODUnity.RuntimeManager.CreateInstance("event:/SFX/ShakingGate");

        turulSFXScript = turul.GetComponent <PlayTurulSFX>();


        bathroomCutceneFootstepsScript = footstepsHolderObject.GetComponent <BathroomCutsceneFootstepsControl>();
    }
Exemple #4
0
    // Use this for initialization
    void Start()
    {
        PauseGameScript = GameObject.Find("GameController")?.GetComponent <PauseGame>();

        AudioActiveStatusManager = GameObject.Find("ActiveStatusManager");

        RandomWordsScript = gameObject.GetComponent <RandomWords>();

        temporaryPictureName = transform.name;//grabbing the correct answer choice based on the parent object

        ImageNameList = new List <string>(RandomWordsScriptHolder.GetComponent <RandomWords>().ListOfChoicesForThisTextGraphic);


        Lights      = GameObject.Find("Lights");
        LightScript = Lights.GetComponent <ProgressiveLights>();

        LevelChanger          = GameObject.Find("LevelChanger");
        SceneManagementScript = LevelChanger.GetComponent <SceneManagement>();
        TitleScreenMusic      = SceneManagement.TitleScreenMusic;
        PostFirstPuzzleMusic  = SceneManagement.PostFirstPuzzleMusic;

        LockViewScript = PlayerCamera.GetComponent <LockView>();
        GroundskeeperRespondsToIncorrectAnswer = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue/Groundskeeper/IncorrectBathroomAnswerResponse");
        GroundskeeperRespondsToCorrectAnswer   = FMODUnity.RuntimeManager.CreateInstance("event:/Dialogue/Groundskeeper/CorrectBathroomAnswerResponse");
        LightningSound = FMODUnity.RuntimeManager.CreateInstance("event:/SFX/Lightning");

        makeItRainInTheBathroom = FMODUnity.RuntimeManager.CreateInstance("event:/Monologue/makeItRainInTheBathroom");

        turulSFXScript  = turul.GetComponent <PlayTurulSFX>();
        gateCloseScript = bathroomCutsceneHolder.GetComponent <TriggerGateClose>();

        charactersInventoryScript = character.GetComponent <Inventory>();

        IHaveMilk  = FMODUnity.RuntimeManager.CreateInstance("event:/ItemInteractions/IHaveMilk");
        IHaveCandy = FMODUnity.RuntimeManager.CreateInstance("event:/ItemInteractions/IHaveCandy");
    }
Exemple #5
0
    void Update()
    {
        if (!PauseGame.GamePaused)                                    // if the game isn't paused
        {
            if (LockViewScript.locked && Input.GetMouseButtonDown(1)) // right mouse button click
            {
                ImageListIndex++;                                     //move through the ImageList and cycle back to 0 at the end
                if (ImageListIndex > ImageNameList.Count - 1)
                {
                    ImageListIndex = 0;
                }
                Debug.Log("ImageListIndex: " + ImageListIndex);
                Debug.Log("ImageNameList Count: " + ImageNameList.Count);
                //for (int i = 0; i < ImageNameList.Count - 1; i++)
                //{
                //    Debug.Log("Image List Name: " + ImageNameList[i]);
                //}
                Debug.Log("ImageNameList Count: " + ImageNameList.Count);
                temporaryPictureName = ImageNameList[ImageListIndex];                                        //string for picture to load

                Sprite SpriteToLoad = Resources.Load <Sprite>("Images/TextSprites/" + temporaryPictureName); //create a space in memory for the sprite to load

                if (SpriteToLoad)                                                                            //error checking
                {
                    TextGraphic.GetComponent <SpriteRenderer>().sprite = SpriteToLoad;                       //if no error, load the sprite
                }
                else
                {
                    Debug.LogError("no sprite found ImageName = " + ImageNameList[ImageListIndex]);//if there is an error, notify the developers
                }

                FMODUnity.RuntimeManager.PlayOneShot("event:/SFX/RightClickScrollThroughWords");//aural feedback to confirm we're cycling through choices
            }//end of right click

            if (Input.GetMouseButtonDown(0))                      //left click submits an answer choice
            {
                if (temporaryPictureName == currentCorrectAnswer) //if the answer is correct
                {
                    TextGraphic.SetActive(false);
                    if (LockViewScript.LockedWithGroundskeeper) //if provided the correct answer for bathroom while speaking with the groundskeeper
                    {
                        stormSystemAnimator.enabled = true;
                        ProgressiveLights.turnOnFog();
                        stormSoundControlsScript.StormSoundInstance.start();
                        GroundskeeperRespondsToCorrectAnswer.start(); //groundskeeper says 'there' in Hungarian
                        generalRainSoundScript.generalRainSounds.setParameterValue("rainTypes", 1);
                        LockViewScript.randomWord                         = null;
                        LockViewScript.randomWordBool                     = false;
                        LockViewScript.LockedWithGroundskeeper            = false;
                        LockViewScript.bathroomLightningCutSceneCameraPan = true; //camera pans to the bathroom
                        LockViewScript.checkHit = false;
                        //Groundskeeper.SetActive(false);
                        var bathroomStuffPosition = FMODUnity.RuntimeUtils.To3DAttributes(bathroomStuff.transform.position);
                        LightningSound.set3DAttributes(bathroomStuffPosition);
                        LightningSound.start();
                        StartCoroutine(delayAppearanceOfBathroomStuff());
                        SceneManagementScript.ShouldFadeInPostFirstLevelTrack = true;
                        ProgressiveLights.lightsShouldBeDimming = true;
                        LightScript.rotateSunBathroomAppearance = true;
                        //LightScript.targetLightIntensity -= LightScript.targetDimAmount*3;
                        LightScript.lowerExposureBathroomAppearance = true;
                        PuzzleManagement.shouldIncreaseGrainSizeBathroomAppearance = true;
                        LightScript.MakeAmbientCreepier();//make the game slightly darker to help add progressive creepy ambience
                        increaseGraininessOfGraphics();
                    }

                    if (LockViewScript.LockedWithForint)
                    {
                        makeItRainInTheBathroom.start();
                        InventoryItemManager.playerHasForint = true;

                        TextGraphic.SetActive(false);
                        Forint.SetActive(false);
                    }
                    if (LockView.LockedWithMilk)
                    {
                        InventoryItemManager.playerHasMilk = true;

                        milk.SetActive(false);
                        IHaveMilk.start();
                        //charactersInventoryScript.addObtainedItemPictureToNextAvailableSlot(holdMySpriteScript.myInventorySprite);
                    }
                    if (LockViewScript.LockedWithCharlie)
                    {
                        DialogueWithCharlie.CorrectWordForMedicineResponse.start();
                        TextGraphic.SetActive(false);
                        PuzzleManagement.PlayerIsDoingSicknessPuzzle = false;
                        //StartCoroutine(delayTransitionOutOfSicknessPuzzle());
                        PuzzleManagement.PlayerIsDoingCandyPuzzle = true;
                        InventoryItemManager.playerHasMedicine    = true;

                        turulSFXScript.playerHasInteractedWithTurulThisPuzzle = false;
                        turulSFXScript.emersionLightningHasStruckThisPuzzle   = false;
                        //gateCloseScript.PlayLoopingTurulSquawk();
                        PlayLoopingSquawk.TurulLoopsSquawk.start();
                    }
                    if (LockViewScript.LockedWithCandyBowl)
                    {
                        TextGraphic.SetActive(false);
                        InventoryItemManager.playerHasCandy = true;
                        IHaveCandy.start();
                    }


                    if (LockViewScript.LockedWithBasin && !PuzzleManagement.WaterWordSolved)
                    {
                        PuzzleManagement.WaterWordSolved = true;
                        PuzzleManagement.NumberOfFullElementsPuzzlesSolved++;
                        TextGraphic.SetActive(false);
                        Debug.Log("inside correct answer for water");
                        LockViewScript.LockedWithBasin = false;
                        TurulSaysIgenSound.start();
                    }
                    if (LockViewScript.LockedWithFlowerPot && !PuzzleManagement.EarthWordSolved)
                    {
                        PuzzleManagement.EarthWordSolved = true;
                        PuzzleManagement.NumberOfFullElementsPuzzlesSolved++;
                        TextGraphic.SetActive(false);
                        Debug.Log("inside correct answer for flower pot");
                        LockViewScript.LockedWithFlowerPot = false;
                        TurulSaysIgenSound.start();
                    }

                    if (LockViewScript.LockedWithTorch && !PuzzleManagement.FireWordSolved)
                    {
                        PuzzleManagement.FireWordSolved = true;
                        PuzzleManagement.NumberOfFullElementsPuzzlesSolved++;
                        TextGraphic.SetActive(false);
                        Debug.Log("inside correct answer for fire");
                        LockViewScript.LockedWithTorch = false;
                        TurulSaysIgenSound.start();
                    }
                    if (LockViewScript.LockedWithPinwheel && !PuzzleManagement.WindWordSolved)
                    {
                        PuzzleManagement.WindWordSolved = true;
                        PuzzleManagement.NumberOfFullElementsPuzzlesSolved++;
                        TextGraphic.SetActive(false);
                        Debug.Log("inside correct answer for wind");
                        LockViewScript.LockedWithPinwheel = false;
                        TurulSaysIgenSound.start();
                    }
                }
                else //incorrect answer choice
                {
                    if (LockViewScript.LockedWithGroundskeeper)
                    {
                        GroundskeeperRespondsToIncorrectAnswer.start();
                    }
                    //FMODUnity.RuntimeManager.PlayOneShot("event:/Words/Incorrect_Answer");//negative aural feedback to player for an incorrect answer
                    else if (LockViewScript.LockedWithCharlie)
                    {
                        DialogueWithCharlie.IncorrectWordForMedicineResponse.start();
                    }

                    else
                    {
                        generalIncorrectAnswerOrInteractionComment.start();
                    }
                }
            }//end of left click
        }
    }        //end of update
Exemple #6
0
 private void Start()
 {
     lightsScript   = lights.GetComponent <ProgressiveLights>();
     turulSFXScript = turul.GetComponent <PlayTurulSFX>();
     turulsAnimator = turul.GetComponent <Animator>();
 }