Exemplo n.º 1
0
    public void JumpToCatPuzzle()
    {
        PlayerIsDoingCatPuzzle = true;

        //scene changes
        DoorScript.playerHasExploredTheCemetery = true;
        bathroomStuff.SetActive(true);
        bathroomDoor.SetActive(false);
        wallInFrontOfBathroom.SetActive(false);
        groundskeeper.SetActive(false);
        DoorScript.BathroomCutsceneHasPlayed = true;//triggers gate closing

        //dialogue progression
        DialogManager.PlayerHasAskedWhereTheBathroomIs = true;
        DialogManager.PlayerHasLearnedWordForBathroom  = true;
        DialogManager.GroundskeeperSaidThere           = true;
        DialogManager.ITriedToFindTheBathroomPlayed    = true;
        DialogManager.HeDoesntKnowEnglishHasPlayed     = true;
        DialogManager.learnedFurduszoba = true;
        DialogManager.BathroomAttendantSaidToGetForint = true;

        //lets get darker twice because player has solved the word for bathroom and forint
        ProgressiveLights.lightsShouldBeDimming = true;

        lightsScript.targetLightIntensity -= lightsScript.targetDimAmount;
        lightsScript.targetLightIntensity -= lightsScript.targetDimAmount;

        lightsScript.MakeAmbientCreepier();
        lightsScript.MakeAmbientCreepier();

        //scene gets grainier twice because player has solved the word for bathroom and forint
        makeGraphicsGrainier();
        makeGraphicsGrainier();

        //change the music
        SceneManagement.TitleScreenMusic.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
        SceneManagement.PostFirstPuzzleMusic.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
        SceneManagement.PostBathroomMusic.start();

        //make turul squawk
        //TriggerGateClose.loopingTurulSquawkSound.start();
        PlayLoopingSquawk.TurulLoopsSquawk.start();
    }
    public void CatPuzzleSolvedResponse()
    {
        catPuzzleLoopScript.catPuzzleLoopSound.setParameterValue("OnOff", 0f);
        catPuzzleLoopScript.catPuzzleLoopSound.setParameterValue("catSounds", 1.0f);
        lightsScript.targetLightIntensity      -= lightsScript.targetDimAmount;
        ProgressiveLights.lightsShouldBeDimming = true;

        lightsScript.MakeAmbientCreepier();
        lockViewScript.makeGraphicsGrainier();

        //gateCloseScript.PlayLoopingTurulSquawk();
        PlayLoopingSquawk.TurulLoopsSquawk.start();
        PuzzleManagement.PlayerIsDoingBathroomPuzzle          = false;
        PuzzleManagement.PlayerIsDoingCatPuzzle               = false;
        PuzzleManagement.PlayerIsDoingSicknessPuzzle          = true;
        turulSFXScript.playerHasInteractedWithTurulThisPuzzle = false;
        turulSFXScript.emersionLightningHasStruckThisPuzzle   = false;
        gameObject.SetActive(false);
        lockViewScript.HoldItem(PlayerItem.None, null);
    }
    public void triggerBathroomCutsceneBool()
    {
        DoorScript.BathroomCutsceneHasPlayed        = true;
        ProgressiveLights.fogShouldBeGettingFoggier = true;
        gateCreakAndLockSound.start();
        generalRainSoundScript.generalRainSounds.setParameterValue("rainTypes", 2);
        mausoleumRainHolder.SetActive(true);
        BushRainSoundHolder.SetActive(true);
        stormSoundControlsScript.increaseThunderAndRainIntensityAfterBathroomCutscene();
        sceneManagementScript.ShouldFadeInPostBathroomMusic = true;
        ProgressiveLights.lightsShouldBeDimming             = true;
        LightsScript.rotateSunBathroomCutscene = true;
        //RenderSettings.skybox.SetColor("_Tint", new Color(0.0f, 51.0f/255.0f, 106.0f/255.0f, 1.0f));
        //testSkyBox.SetColor("_Tint", new Color(0.0f, 51.0f / 255.0f, 106.0f / 255.0f, 1.0f));
        LightsScript.lowerExposureBathroomCutscene = true;
        PuzzleManagement.shouldIncreaseGrainSizeBathroomCutscene = true;
        PuzzleManagement.shouldIncreaseVignetteIntensity         = true;
        LightsScript.targetLightIntensity -= LightsScript.targetDimAmount;

        LightsScript.MakeAmbientCreepier();//make the game slightly darker to help add progressive creepy ambience
        stormSystemAnimator.Play("Storm Convergence 2");
        PPVScript = PostProccessingValue.GetComponent <PostProcessVolume>();
        PPVScript.profile.TryGetSettings <Grain>(out GrainLayer);
        PPVScript.profile.TryGetSettings <Vignette>(out VignetteLayer);

        /* GrainLayer.intensity.Override(GrainLayer.intensity * PPVMultiplier);
         * VignetteLayer.intensity.Override(VignetteLayer.intensity * PPVMultiplier);
         * if (GrainLayer.intensity > maxGrainIntensity)
         * {
         *   GrainLayer.intensity.Override(maxGrainIntensity);
         * }
         * if (VignetteLayer.intensity > maxVignetteIntensity)
         * {
         *   VignetteLayer.intensity.Override(maxVignetteIntensity);
         * }*/
    }
Exemplo n.º 4
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