void Scene3() { if (back1) { FinalEmpty[1] = DI_Done2[Random.Range(0, DI_Done2.Length)]; FinalEmpty[0] = DI_Done1[Random.Range(1, DI_Done1.Length)]; Guard1_con.SetSeq(FinalEmpty, true); } else { Guard1_con.PlaySound(DI_Done1[0], true); } Door3.GetComponent <Object_Door>().DoorSwitch(); Guard1_con.SetLookAt(playerHead); Guard2_con.StopLookAt(); Guard2_con.PausePath(); Check2 = false; NextScene.SetActive(true); }
void IntroUpdate() { if (ActiveTimer) { Timer -= Time.deltaTime; } if (runningAway) { RunawayTimer -= Time.deltaTime; } if (RunawayTimer <= 0.0f && runningAway == true) { if (EventState == -5) { Escape5(); } if (EventState == -4) { Escape4(); } if (EventState == -3) { Escape3(); } if (EventState == -2) { Escape2(); } if (EventState == -1) { Escape1(); } } if (Timer <= 0.0f && Start == false) { Timer = Timer1; Guard1_con.PlaySound(Dialogs[0], true); if (grabbed == false) { SCP_UI.instance.ShowTutorial("tutograb"); } Start = true; } if (grabbed == false && Item == null) { SCP_UI.instance.ShowTutorial("tutoinv1"); grabbed = true; } if (Timer <= 0.0f && StopTimer == false && Start == true) { if (EventState == -13) { EVRefuse3(); } if (EventState == -12) { EVRefuse2(); } if (EventState == -11) { EVRefuse1(); } if (EventState == 3) { Scene3(); StopTimer = true; } if (EventState == 2) { Scene2(); } if (EventState == 1) { Scene1_5(); } if (EventState == 0) { Scene1(); } } if (ActiveTimer2) { TimerSecondary -= Time.deltaTime; } if (TimerSecondary <= 0.0f && StopTimer2 == false) { if (EventState2 == 2) { AsyncScene_2(); } if (EventState2 == 1) { AsyncScene_1(); } } if (Check1 == true) { if (Trigger1.GetComponent <BoxTrigger>().GetState()) { Check1 = false; ActiveTimer = true; Scene1_6(); } } if (Check3 == true) { if (Trigger3.GetComponent <BoxTrigger>().GetState()) { if (!back1) { Guard1_con.PlaySound(Dialogs[5], true); back1 = true; } Guard1_con.ResumePath(); Guard1_con.StopRota(); Guard1_con.AnimTrigger(1, false); Guard1_con.StopLookAt(); Guard2_con.ResumePath(); LastState = EventState; Check3 = false; Check2 = true; ActiveTimer = true; runningAway = false; EventState = 3; } } if (Check2 == true) { if (!Trigger2.GetComponent <BoxTrigger>().GetState() && EventState != -1) { Guard1_con.StopSound(); Guard2_con.StopSound(); EventState = LastState; if (!back1) { RunawayTimer = 6; Guard1_con.PlaySound(Dialogs[2], true, true); } if (Conver != -1) { StopCoroutine(co); Conver = -1; } Guard1_con.SetLookAt(playerHead); ActiveTimer = false; ActiveTimer2 = false; runningAway = true; Guard1_con.SetRota(Player.transform); Guard2_con.SetLookAt(playerHead); Guard2_con.PausePath(); Guard1_con.PausePath(); Check2 = false; Check3 = true; } } if (Check4 == true) { if (Trigger4.GetComponent <BoxTrigger>().GetState()) { Guard1_con.StopPursuit(); Guard1_con.PlaySound(Gunshot); Player.GetComponent <Player_Control>().Death(0); GameController.instance.deathmsg = Localization.GetString("deathStrings", "death_intro"); Check4 = false; Check3 = false; Check2 = false; runningAway = false; Guard1_con.AnimTrigger(-1, true); } } }