private void DesactivateCameraOpenRoom() { Monster.GetInstance().currActionState = Monster.MonsterActionState.Spawn; Monster.GetInstance().SetVisibility(false); Monster.GetInstance().mosterNV.enabled = false; Monster.SetAnimationState(Monster.MonsterAnimation.Idle1); FalseMonster.GetInstance().Desactivate(); //HelperUtil.SetVisibility(Player.GetInstance().gameObject, true); GameObject.Find("CameraLockClosedRoom").GetComponent <Camera>().enabled = false; Player.GetInstance().GetComponent <FirstPersonController>().enabled = true; Main.GetInstance().inCutScene = false; }
public void SetEvent(string eventName) { switch (eventName) { case "pegueOCelular": SubtitleManager.GetInstance().SetText("Pegue o celular"); break; case "espacoParaInteragir": SubtitleManager.GetInstance().SetText("Pressione [ESPAÇO] para interagir"); break; case "desactivateAllCameras": DesactivateAllCameras(); break; case "shakeDoors": ShakeDoors(); break; case "lockDoors": LockDoors(); break; case "activateIconFlashLight": ActivateIconFlash(); break; case "activateIconSmartPhone": GameObject.Find("tutorial").SetActive(false); GameObject.Find("tutorial2").SetActive(false); ActivateIconSmartPhone(); break; case "initialEvent": Invoke("InitialEvent", 3); Invoke("ActivateIconFlash", 3); Invoke("BabyCry", 5); Invoke("ActivateBaby", 6); //Monster.GetInstance().currActionState = Monster.MonsterActionState.Rest; break; case "lockCameraPicture1": Player.GetInstance().GetComponent <FirstPersonController>().enabled = false; Main.GetInstance().inCutScene = true; FadeInScreen(); Invoke("ActivateCameraEventPicture", 1.2f); Invoke("FadeOutScreen", 1.8f); Invoke("FadeInScreen", 4.8f); Invoke("FadeOutScreen", 5.5f); Invoke("DesactivateCameraEventPicture", 5.5f); break; case "activatePart2": ShakeDoors(); ActivatePartPicture(Constants.PictureP2Item); HelperUtil.FindGameObject(GameObject.Find("Eventos"), "Item2").SetActive(true); break; case "activateAnimPart2": //HelperUtil.FindGameObject(GameObject.Find("Quadros de Enfeite"), "Q01").GetComponent<Animator>().SetTrigger("activate"); HelperUtil.FindGameObject(GameObject.Find("Quadros de Enfeite"), "Q01").GetComponent <Rigidbody>().constraints = RigidbodyConstraints.None; HelperUtil.FindGameObject(GameObject.Find("Audio"), "SoundQuadroCaindo").SetActive(true);; break; case "activatePart3": Player.GetInstance().GetComponent <FirstPersonController>().enabled = false; Main.GetInstance().inCutScene = true; Monster.GetInstance().CancelAttack(); Monster.GetInstance().currActionState = Monster.MonsterActionState.Rest; Monster.GetInstance().SetVisibility(false); FalseMonster.GetInstance().Activate(); //Monster.GetInstance ().mosterNV.enabled = true; //Monster.SetAnimationState (Monster.MonsterAnimation.Crawl); //Monster.GetInstance().gameObject.transform.position = new Vector3(269.02f, 4.449f, 237.2929f); //Monster.GetInstance().gameObject.transform.position = new Vector3(270.67f, 4.449f, 237.2929f); //Monster.GetInstance().mosterNV.destination = GameObject.Find("AlvoBebe").transform.position; ActivatePartPicture(Constants.PictureP3Item); GameObject.Find("PortaChave").GetComponent <DoorWrapper>().typeAnim = DoorWrapper.DoorAnim.Locked; FadeInScreen(); Invoke("ActivateCameraOpenRoom", 1.2f); Invoke("FadeOutScreen", 2); Invoke("OpenClosedRoom", 1.4f); Invoke("FadeInScreen", 4.8f); Invoke("FadeOutScreen", 5.5f); Invoke("DesactivateCameraOpenRoom", 5.5f); //FadeInScreen(); break; case "activatePart4": ActivatePartPicture(Constants.PictureP4Item); GameObject.Find("PortaEscritorio").GetComponent <DoorWrapper>().typeAnim = DoorWrapper.DoorAnim.Locked; break; case "audioVidroArranhado": Invoke("ActivateSoundVidroArranhado", 0.6f); break; case "babyPersecution": //Monster.GetInstance().currActionState = Monster.MonsterActionState.Rest; Monster.GetInstance().PersecutionMode(); Monster.GetInstanceAudioSource().GetComponent <AudioSource>().Pause(); Monster.SetAnimationState(Monster.MonsterAnimation.Crawl); Player.GetMotionBlur().blurAmount = 0.6f; HelperUtil.FindGameObject(GameObject.Find("Audio"), "SoundPersecution").SetActive(true); IncreaseSoundPersecution(); break; case "babyRest": Player.GetInstance().GetComponent <FirstPersonController>().enabled = false; Main.GetInstance().inCutScene = true; //Player.GetInstance().GetComponent<FirstPersonController>().ChangeMouseSensitivity(0, 0); Monster.GetInstance().CancelAttack(); Monster.GetInstance().currActionState = Monster.MonsterActionState.Rest; GameObject.Find("portaFinal").GetComponent <Animator>().SetTrigger("open2"); HelperUtil.FindGameObject(GameObject.Find("Iluminação"), "spotPortaBebe").SetActive(true); HelperUtil.FindGameObject(GameObject.Find("Iluminação"), "luzParte3").GetComponentInChildren <Light>().range = 4; FadeInScreen(); Invoke("FadeOutScreen", 1.8f); Invoke("ActivateCameraRoomBaby", 1.4f); Invoke("FadeInScreen", 4.8f); Invoke("FadeOutScreen", 5.5f); Invoke("DesactivateCameraRoomBaby", 5.5f); break; case "gameOver": Player.GetInstance().GetComponent <FirstPersonController>().enabled = false; Main.GetInstance().inCutScene = true; FadeInScreen(); Invoke("FadeOutScreen", 1.8f); Invoke("ActivateSoundBaby", 2); Invoke("ActivateCameraGameOver", 1.4f); Invoke("FadeInScreen", 4.8f); Invoke("ActivateSoundWoman", 7.2f); Invoke("FadeInGameOver", 10); //Invoke("FadeOutScreen", 5.5f); break; } }