IEnumerator SessionFourScript() { Game.StopSong(); Game.PlaySoundEffect(content.audio.transition_4); Tree.Office.Scene.SetupEarly(); Fader.Visible = false; Tree.GUI.Interaction.Scene.Interactive = false; Game.EnableSkipping(); Tree.GUI.Interaction.Scene.Visible = false; Game.Ego.Inventory.Hide(); Tree.Actors.Scene.Enabled = false; Tree.Basement.Scene.Interactive = false; Tree.Basement.Scene.Visible = false; Tree.Office.Scene.Visible = true; Tree.Office.Scene.Interactive = true; Tree.Office.Scene.Enabled = true; yield return(Delay.Seconds(1)); yield return(Psychiatrist.Say(GlblRes.I_think_we_could_both_benefit_from_learning_a_little_bit_more_about_yourself)); Game.PlaySong(content.audio.session4); World.Get <AudioManager>().RepeatSong = true; yield return(Delay.Seconds(1)); yield return(RyanVoice.Say(GlblRes.Like_what)); yield return(Psychiatrist.Say(GlblRes.Well_what_do_you_do_for_work)); yield return(RyanVoice.Say(GlblRes.Im_a_mechanical_engineer)); yield return(Psychiatrist.Say(GlblRes.And_you_like_your_work)); Game.StopSkipping(); var Menu = Tree.GUI.Dialog.Menu; var FirstDialog = ScoreOptions.Create() .Add(1, GlblRes.Cant_complain, ScoreType.Freedom, 1) .Add(2, GlblRes.Its_awful, new Dictionary <ScoreType, int> { { ScoreType.Jail, 1 }, { ScoreType.Insanity, 1 } }); Menu.Open(FirstDialog); yield return(Menu.StartSelectionScript(Get <Scripts>())); Game.EnableSkipping(); var FirstSelection = Menu.LastSelectedOption; ProcessScore(FirstSelection); if (FirstSelection.ID == 2) { yield return(RyanVoice.TransitionTo(RyanState.ArmsCrossed)); } else { yield return(RyanVoice.TransitionTo(RyanState.HandsIntertwined)); } yield return(RyanVoice.Say(FirstSelection.Text)); if (FirstSelection.ID == 1) { yield return(Psychiatrist.Say(GlblRes.Thats_good_Liking_what_you_do_is_important)); } else { yield return(Psychiatrist.Say(GlblRes.Im_sorry_to_hear_that)); } yield return(Psychiatrist.Say(GlblRes.So_were_you_upset_about_having_to_change_offices_to_be_with_your_son)); Game.StopSkipping(); var SecondDialog = ScoreOptions.Create() .Add(1, GlblRes.Yes_I_dont_handle_change_well, ScoreType.Insanity, 1) .Add(2, GlblRes.Yes_I_had_it_good_where_I_was, ScoreType.Jail, 1) .Add(3, GlblRes.No_It_doesnt_matter_to_me_if_Im_with_my_family, ScoreType.Freedom, 1); Menu.Open(SecondDialog); yield return(Menu.StartSelectionScript(Get <Scripts>())); Game.EnableSkipping(); var SecondSelection = Menu.LastSelectedOption; ProcessScore(SecondSelection); if (SecondSelection.ID == 1 || SecondSelection.ID == 2) { yield return(RyanVoice.TransitionTo(RyanState.ArmsCrossed)); } else { yield return(RyanVoice.TransitionTo(RyanState.HandsIntertwined)); } yield return(RyanVoice.Say(SecondSelection.Text)); switch (SecondSelection.ID) { case 1: yield return(Psychiatrist.Say(GlblRes.I_see_Perhaps_this_time_however_it_was_for_the_best)); break; case 2: yield return(Psychiatrist.Say(GlblRes.Thats_unfortunate_But_I_wonder_if_you_cant_make_something_better_for_yourself_where_you_are_now)); break; case 3: yield return(Psychiatrist.Say(GlblRes.Good_to_hear_Your_family_is_your_support_system)); break; } yield return(Delay.Seconds(1)); yield return(Psychiatrist.Say(GlblRes.Anyways_work_isnt_the_only_thing_that_makes_up_a_man_What_would_you_say_you_do_for_fun)); yield return(RyanVoice.TransitionTo(RyanState.Neutral)); yield return(RyanVoice.Say(GlblRes.Oh_I_dont_know_I_play_the_guitar)); yield return(Psychiatrist.Say(GlblRes.And_do_you_find_that_playing_helps_you_when_you_are_agitated)); yield return(RyanVoice.TransitionTo(RyanState.ArmsCrossed)); yield return(RyanVoice.Say(GlblRes.Do_you_have_to_call_it_that)); yield return(Delay.Seconds(1)); yield return(Psychiatrist.Say(GlblRes.Im_sorry_is_there_something_else_you_would_prefer_I_call_your_episodes)); yield return(Delay.Seconds(0.25f)); Psychiatrist.StartWriting(); var Sound = Game.PlaySoundEffect(content.audio.scribble_long); yield return(RyanVoice.Say(GlblRes.Well_I_I_dont_know_It_doesnt_matter_Besides_I_havent_had_a_problem_like_that_in_a_long_time)); yield return(Script.WaitFor(Sound)); Psychiatrist.StopWriting(); yield return(Psychiatrist.Say(GlblRes.Is_that_true_Youre_taking_your_medications_regularly)); yield return(RyanVoice.Say(GlblRes.Dont_you_believe_me)); Tree.Basement.Scene.Visible = true; Tree.Office.Scene.Visible = false; yield return(RyanVoice.TransitionTo(RyanState.Neutral, 0)); Tree.Office.Scene.Enabled = false; Tree.Cutscenes.Scene.Visible = false; Tree.Cutscenes.Scene.Enabled = false; Tree.GUI.Interaction.Scene.Visible = true; Game.Ego.Inventory.Show(); Tree.Basement.Scene.Interactive = true; Tree.Actors.Scene.Enabled = true; Tree.GUI.Interaction.Scene.Interactive = true; World.Interactive = true; Game.StopSkipping(); }
IEnumerator SessionOneScript() { Game.StopSong(); World.Get <AudioManager>().RepeatSong = false; var BloomSettings = new BloomSettings("SessionSeven", 0.75f, 1.5f, 0.8f, 1, 1, 1); World.Get <RenderSettings>().BloomSettings = BloomSettings; Game.Ego.Inventory.Hide(); Tree.Office.Scene.SetupEarly(); Game.EnableSkipping(); Game.EnableTextSkipping(false); yield return(Delay.Seconds(1)); Get <Scripts>().Start(StartMusicScript()); Tree.GUI.Interaction.Scene.Visible = false; Tree.Actors.Scene.Enabled = false; Tree.Basement.Scene.Interactive = false; Tree.Basement.Scene.Visible = false; Tree.Actors.Scene.Enabled = false; Tree.GUI.Mouse.Visible = true; Tree.Office.Scene.Visible = true; Tree.Office.Scene.Interactive = true; Tree.Office.Scene.Enabled = true; World.Get <RenderSettings>().BloomEnabled = true; Game.Ego.Enabled = false; Game.Ego.Visible = false; RyanEyesClosed.Blinking = false; RyanEyesClosed.Visible = true; Psychiatrist.StartWriting(); var Sound = Game.PlaySoundEffect(content.audio.scribble_short); var FadeScript = Get <Scripts>().Start(FadeInScript()); int Frames = 0; while (Sound.IsPlaying()) { yield return(1); Frames++; if (Frames > 90) { RyanEyesClosed.Blinking = true; } } RyanEyesClosed.Blinking = true; Psychiatrist.StopWriting(); yield return(STACK.Script.WaitFor(FadeScript)); yield return(Delay.Seconds(0.3f)); yield return(Psychiatrist.Say(GlblRes.And_what_was_life_like_for_you_there_Ryan, 4f)); yield return(Psychiatrist.Say(GlblRes.How_did_things_go, 3f)); Game.PlaySoundEffect(content.audio.transition_1); Tree.Actors.Scene.Enabled = true; Tree.Basement.RyanLying.Visible = true; Tree.Basement.RyanLying.Enabled = true; Tree.Basement.RyanLying.State = Basement.RyanLyingState.EyesClosed; Tree.Basement.Scene.Visible = true; Tree.Office.Scene.Visible = false; Tree.Office.Scene.Enabled = false; Fader.Color = Color.Black; Fader.Visible = true; Sound = Tree.Basement.RyanLying.PlayWhiningSound(); World.Get <RenderSettings>().BloomSettings = new BloomSettings("temp", 0, 8, 3.5f, 1, 1, 0); World.Get <RenderSettings>().BloomEnabled = true; const int loops2 = 500; bool eyesOpen = false; for (int j = 0; j < loops2; j++) { Fader.Color = new Color(255, 255, 255, Math.Max(0, 200 - j)); World.Get <RenderSettings>().BloomSettings.BloomThreshold += 0.75f / loops2; World.Get <RenderSettings>().BloomSettings.BlurAmount -= 6.5f / loops2; World.Get <RenderSettings>().BloomSettings.BloomIntensity -= 2.7f / loops2; // -> 1 World.Get <RenderSettings>().BloomSettings.BaseSaturation += 1.0f / loops2; switch (j) { case 300: eyesOpen = true; break; case 380: eyesOpen = false; break; case 400: eyesOpen = true; break; } Tree.Basement.RyanLying.State = eyesOpen ? Basement.RyanLyingState.EyesOpen : Basement.RyanLyingState.EyesClosed; yield return(1); } World.Get <RenderSettings>().BloomSettings = BloomSettings; Fader.Color = Color.Black; Fader.Visible = false; yield return(STACK.Script.WaitFor(Sound)); Tree.Basement.Scene.Visible = false; Tree.Office.Scene.Visible = true; Tree.Office.Scene.Enabled = true; RyanEyesClosed.Blinking = false; RyanEyesClosed.Visible = true; yield return(Delay.Seconds(1)); RyanEyesClosed.Blinking = true; yield return(RyanVoice.TransitionTo(Office.RyanState.HandsIntertwined)); yield return(RyanVoice.Say(GlblRes.Do_you_have_to_ask_It_was_horrible, 4.6f)); Tree.Basement.RyanLying.State = Basement.RyanLyingState.SittingEyesClosed; Tree.Basement.RyanLying.Get <Transform>().SetPosition(259 + 22, 178); RyanEyesClosed.Blinking = false; RyanEyesClosed.Visible = true; yield return(Delay.Seconds(0.75f)); RyanEyesClosed.Blinking = true; yield return(RyanVoice.Say(GlblRes.It_wasnt_a_life_It_wasnt_living, 4.5f)); Tree.Basement.Scene.Visible = true; Tree.Office.Scene.Visible = false; Tree.Office.Scene.Enabled = false; Tree.Basement.RyanLying.State = Basement.RyanLyingState.SittingEyesClosed; yield return(Delay.Seconds(0.5f)); Tree.Basement.RyanLying.State = Basement.RyanLyingState.SittingEyesOpen; yield return(Delay.Seconds(0.3f)); Tree.Basement.RyanLying.State = Basement.RyanLyingState.SittingEyesClosed; yield return(Delay.Seconds(0.2f)); Tree.Basement.RyanLying.State = Basement.RyanLyingState.SittingEyesOpen; yield return(Delay.Seconds(1.3f)); Tree.Basement.Scene.Visible = false; Tree.Office.Scene.Visible = true; Tree.Office.Scene.Enabled = true; yield return(Delay.Seconds(2)); yield return(Psychiatrist.Say(GlblRes.And_what_was_the_worst_part_about_it_would_you_say, 4f)); yield return(Delay.Seconds(0.3f)); Tree.Basement.Scene.Visible = true; Tree.Office.Scene.Visible = false; Tree.Office.Scene.Enabled = false; Tree.Actors.RyanVoice.Visible = true; yield return(Tree.Actors.RyanVoice.Say(GlblRes.Hello, 1.6f)); yield return(Delay.Seconds(0.5f)); yield return(Tree.Actors.RyanVoice.Say(GlblRes.Cynthia, 1.8f)); Tree.Actors.RyanVoice.Visible = false; yield return(Delay.Seconds(2)); Tree.Basement.Scene.Visible = false; Tree.Office.Scene.Visible = true; Tree.Office.Scene.Enabled = true; yield return(RyanVoice.Say(GlblRes.The_not_knowing_Definitely, 3.8f)); yield return(RyanVoice.TransitionTo(Office.RyanState.Neutral)); Tree.Office.Therapist.StartWriting(); Sound = Game.PlaySoundEffect(content.audio.scribble_long); var Script = RyanVoice.Say(GlblRes.Not_knowing_what_was_going_to_happen_next_or_who_was_going_to_be_waiting_for_me_not_knowing_what_would_happen_to_me_or_my_family, 14.6f); yield return(Script.WaitFor(Sound)); Tree.Office.Therapist.StopWriting(); yield return(Script.WaitFor(Script)); Tree.Basement.Scene.Visible = true; Tree.Office.Scene.Visible = false; Tree.Office.Scene.Enabled = false; Game.Ego.Visible = true; Game.Ego.Enabled = true; Tree.Basement.RyanLying.Visible = false; Tree.Basement.RyanLying.Enabled = false; yield return(Game.Ego.GoTo(400, 250)); yield return(Game.Ego.Say(GlblRes.HelloExclamation, 1.8f)); yield return(Game.Ego.GoTo(150, 250)); yield return(Game.Ego.Say(GlblRes.Help_Help_me, 2.4f)); Tree.Basement.Scene.Visible = false; Tree.Office.Scene.Visible = true; Tree.Office.Scene.Enabled = true; yield return(RyanVoice.Say(GlblRes.Not_knowing_how_the_hell_I_was_going_to_get_out_of_there_or_if_I_ever_would_living_in_a_constant_state_of_fear, 12.5f)); yield return(Delay.Seconds(0.25f)); RyanEyesClosed.Blinking = false; RyanEyesClosed.Visible = true; yield return(Delay.Seconds(0.25f)); yield return(RyanVoice.Say(GlblRes.That_by_far_was_the_worst_part_of_it, 4.9f)); Game.Ego.Get <Transform>().SetPosition(100, 250); Tree.Basement.Scene.Visible = true; Tree.Office.Scene.Visible = false; Tree.Office.Scene.Enabled = false; RyanEyesClosed.Blinking = true; // Blood dropping Game.Ego.Get <BloodDropEmitter>().Start(); yield return(Delay.Seconds(1.5f)); FadeScript = Get <Scripts>().Start(FadeOutScript()); yield return(Game.Ego.Say(GlblRes.HelloExclamation, 1.8f)); Script = Game.Ego.GoTo(500, 250); yield return(STACK.Script.WaitFor(Script, FadeScript)); yield return(Delay.Seconds(1)); Game.StopSkipping(); Game.EnableSkipping(); Game.PlaySoundEffect(content.audio.title); yield return(Delay.Seconds(0.5f)); Tree.Title.Scene.Visible = true; yield return(FadeInScript()); yield return(Delay.Seconds(4)); Game.Ego.Get <Transform>().SetPosition(300, 250); yield return(FadeOutScript()); Tree.Title.Scene.Visible = false; Game.Ego.Turn(Directions4.Down); yield return(FadeInScript()); Tree.Office.Scene.Enabled = false; Tree.Office.Scene.Visible = false; Tree.Office.Scene.Background.Visible = true; Tree.Basement.Scene.Interactive = true; Game.EnableTextSkipping(true); yield return(Game.Ego.Say(GlblRes.Ouch_How_the_hell_did_this_happen)); yield return(Game.Ego.Say(GlblRes.I_need_to_bandage_my_hand_I_think_we_have_a_medicine_cabinet_down_here_somewhere)); Tree.Cutscenes.Scene.Visible = false; Tree.Cutscenes.Scene.Enabled = false; Tree.GUI.Interaction.Scene.Visible = true; Game.Ego.Inventory.Show(); Game.StopSkipping(); Game.StopSong(); World.Interactive = true; }