//public AnimationControl heartBeatAnim;

    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        DoubleChoiceQuestion Q3 = new DoubleChoiceQuestion(
            "放學後,今天是你期待已久的田徑校隊選拔\n但你現在卻要趕到校外\n上媽媽幫你報名的鋼琴班", "缺席鋼琴班\n參加田徑選拔", "趕赴鋼琴班",
            vrCamera, myGuiModels, SceneSwitchControl.Scene2Q3Name);

        SingleTextStatement Stat4_0 = new SingleTextStatement(
            "你可看見其他同學在操場上\n熱身、跑步、流汗的樣子\n你就忽然鼓起決心", 4.5f,
            vrCamera, myGuiModels);

        SingleTextStatement Stat4_1 = new SingleTextStatement(
            "跑吧!",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement Stat4A_0 = new SingleTextStatement(
            "還是不能辜負父母的期望吧", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat4A_1 = new SingleTextStatement(
            "也許他們也說得對 ……",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        /* end of adding text contents */


        /* setting next stories or next scenes */

        Q3.AddNextStory(Stat4_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q3.AddNextStory(Stat4A_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        Stat4_0.AddNextStory(Stat4_1);
        Stat4_1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration,
                             SceneSwitchControl.Scene2f_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);
        Stat4A_0.AddNextStory(Stat4A_1);
        Stat4A_1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration,
                              SceneSwitchControl.Scene2g_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);

        /* end of setting next stories or next scenes */


        /* setting start gui */


        /* end of setting start gui */
        Q3.SetAsStartGui(storyStartManager);

        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
    //public AnimationControl heartBeatAnim;

    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        DoubleTextStatement Stat0_0_1 = new DoubleTextStatement(Color.white,
                                                                "- 13歲 -", "中二生\n踏上求學生涯,每天學琴、做功課 ……",
                                                                GuiPrefabUtils.DoubleTextFirstGazeDuration, GuiPrefabUtils.DoubleTextSecondGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement Stat0_0_2 = new SingleTextStatement(Color.white,
                                                                "起床了 ……", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        Stat0_0_2.AddPlayAudioOnUiFadeInComplete(GuiPrefabUtils.SceneSoundEffectVolume, false, alarmClip);

        DoubleChoiceQuestion Q1 = new DoubleChoiceQuestion(Color.white,
                                                           "昨晚你做功課到十二點多\n現在卻要六點起床", "多睡五分鐘", "準時起床",
                                                           vrCamera, myGuiModels, SceneSwitchControl.Scene2Q1Name);

        Q1.AddStoreTwoSelectionChoice(SceneSwitchControl.Scene2Q1Name);



        /* end of adding text contents */


        /* setting next stories or next scenes */

        Stat0_0_1.AddNextStory(Stat0_0_2);
        Stat0_0_2.AddNextStory(Q1);
        Q1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene2bName,
                        DoubleChoiceQuestion.SelectionSlider1Or2.Slider1, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);

        Q1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene2bName,
                        DoubleChoiceQuestion.SelectionSlider1Or2.Slider2, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);


        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat0_0_1.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        SingleTextStatement Stat2_0 = new SingleTextStatement(
            "你\n初生於這個家的小男孩", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        //Stat2_0.AddPlayAudioOnUiFadeInComplete(GuiPrefabUtils.SceneSoundEffectVolume, false, babyCry);

        SingleTextStatement Stat2_1 = new SingleTextStatement(
            "有關生活的需要,衣服、食物、玩具 ……\n你爸爸媽媽都為你準備好", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        DoubleChoiceQuestion Q2 = new DoubleChoiceQuestion(
            "即使你討厭牛奶的味道\n媽媽卻每天早上為你準備 ……", "不情願地\n喝一口", "閉上眼睛\n一口喝完",
            vrCamera, myGuiModels, SceneSwitchControl.Scene1Q2Name);

        Q2.SetOnFilledAudioClipForSlider1(drinkMilk);
        Q2.SetOnFilledAudioClipForSlider2(drinkMilk);

        /* end of adding text contents */


        /* setting next stories or next scenes */

        Stat2_0.AddNextStory(Stat2_1);
        Stat2_1.AddNextStory(Q2);
        Q2.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene1cName,
                        DoubleChoiceQuestion.SelectionSlider1Or2.Slider1, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);
        Q2.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene1cName,
                        DoubleChoiceQuestion.SelectionSlider1Or2.Slider2, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);


        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat2_0.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
    //public AnimationControl heartBeatAnim;

    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        SingleTextStatement Stat4_6 = new SingleTextStatement(
            "迷惘煩惱的你相約好友Tony到酒吧\n交換近況", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);


        DoubleChoiceQuestion Q3 = new DoubleChoiceQuestion(
            "Tony最近轉了工,他充滿活力的形象啟發了你\n「我也要轉換一下環境嗎?」", "找一份新工作", "還是多做幾年\n累積經驗再算",
            vrCamera, myGuiModels, SceneSwitchControl.Scene3Q3Name);

        Q3.AddStoreTwoSelectionChoice(SceneSwitchControl.Scene3Q3Name);



        /* end of adding text contents */


        /* setting next stories or next scenes */

        Stat4_6.AddNextStory(Q3);

        Q3.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene3dName,
                        DoubleChoiceQuestion.SelectionSlider1Or2.Slider1, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);

        Q3.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene3dName,
                        DoubleChoiceQuestion.SelectionSlider1Or2.Slider2, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);

        /* end of setting next stories or next scenes */


        /* setting start gui */
        Stat4_6.SetAsStartGui(storyStartManager);
        //Stat4_4.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
예제 #5
0
    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        SingleTextStatement Stat3_0 = new SingleTextStatement(
            "你開始喜歡一些事物\n討厭一些事物", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        DoubleChoiceQuestion Q3 = new DoubleChoiceQuestion(
            "譬如說,媽媽送了一個新書包給你", "喜歡禮物\n親吻媽媽", "不喜歡禮物\n向媽媽發脾氣",
            vrCamera, myGuiModels, SceneSwitchControl.Scene1Q2Name);

        SingleTextStatement Stat4_0 = new SingleTextStatement(
            "你很喜歡爸爸媽媽\n覺得他們就是你的全世界了", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        DoubleChoiceQuestion Q4 = new DoubleChoiceQuestion(
            "因此,當你不小心\n打破了父母心愛的花瓶的時候\n你特別害怕", "向爸爸媽媽\n道歉", "謊稱是小狗\n撞破花瓶",
            vrCamera, myGuiModels, SceneSwitchControl.Scene1Q2Name);

        Q4.AddPlayAudioOnUiFadeInComplete(GuiPrefabUtils.SceneSoundEffectVolume, false, vaseBroken);

        SingleTextStatement Stat4A_0 = new SingleTextStatement(
            "你媽媽為了哄你\n答應再送另一份禮物給你", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement Stat4A_1 = new SingleTextStatement(
            "你開心地笑出來\n你知道他們真的是很疼愛你", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_0 = new SingleTextStatement(
            "爸爸的確很生氣\n第一次這麼凶狠地責罵你", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_1 = new SingleTextStatement(
            "你害怕、你傷心、你哭 ……\n那天,你一整天都沒有再說話", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_2 = new SingleTextStatement(
            "媽媽似乎留意到你的情緒", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_3 = new SingleTextStatement(
            "那天夜晚,她進了你的房間,跟你說:\n「不要緊,爸爸媽媽依然愛你。」", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_4 = new SingleTextStatement(
            "那是你童年裡,一個溫暖而深刻的晚上", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement EndA_0 = new SingleTextStatement(
            "你看來還不擅長撒謊\n爸爸媽媽很快識破你的謊言", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement EndA_1 = new SingleTextStatement(
            "你父母對你撒謊更為生氣\n第一次這麼凶狠地罵你", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        /* end of adding text contents */


        /* setting next stories or next scenes */

        Stat3_0.AddNextStory(Q3);
        Q3.AddNextStory(Stat4_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q3.AddNextStory(Stat4A_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        Stat4_0.AddNextStory(Q4);
        Stat4A_0.AddNextStory(Stat4A_1);
        Stat4A_1.AddNextStory(Stat4_0);
        Q4.AddNextStory(End_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q4.AddNextStory(EndA_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        End_0.AddNextStory(End_1);
        End_1.AddNextStory(End_2);
        End_2.AddNextStory(End_3);
        End_3.AddNextStory(End_4);
        EndA_0.AddNextStory(EndA_1);
        EndA_1.AddNextStory(End_1);
        End_4.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration,
                           SceneSwitchControl.Scene2aName, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);


        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat3_0.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
예제 #6
0
    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        DoubleChoiceQuestion Q5A = new DoubleChoiceQuestion(
            "你走到巴士站,終於離開自修室回家\n卻遇見穿著籃球運動服的同班女同學Jenny\n她一臉心事的樣子 ……", "走過去跟\nJenny聊天", "裝作沒看見\n排在巴士站末端",
            vrCamera, myGuiModels, SceneSwitchControl.Scene2Q5Name);

        Q5A.AddStoreTwoSelectionChoice(SceneSwitchControl.Scene2Q5Name);

        SingleTextStatement Stat6_0 = new SingleTextStatement(
            "你關心Jenny\n為什麼看起來一臉心事", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat6_1 = new SingleTextStatement(
            "原來\nJenny父母希望她這年專心應付公開試\n想Jenny退出籃球隊", 4.5f,
            vrCamera, myGuiModels);

        SingleTextStatement Stat6_2 = new SingleTextStatement(
            "你把自己加入田徑校隊的經歷告訴Jenny ……", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat6_3 = new SingleTextStatement(
            "你的故事似乎鼓舞了Jenny\nJenny展露出笑容\n你和Jenny成為了好朋友", 4.5f,
            vrCamera, myGuiModels);


        /* end of adding text contents */


        /* setting next stories or next scenes */

        Q5A.AddNextStory(Stat6_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q5A.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene2hName,
                         DoubleChoiceQuestion.SelectionSlider1Or2.Slider2, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);
        Stat6_0.AddNextStory(Stat6_1);
        Stat6_1.AddNextStory(Stat6_2);
        Stat6_2.AddNextStory(Stat6_3);
        Stat6_3.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                             GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene2hName, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);



        /* end of setting next stories or next scenes */


        /* setting start gui */

        Q5A.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
예제 #7
0
    //public AnimationControl heartBeatAnim;

    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        SingleTextStatement Stat0_0 = new SingleTextStatement(
            "你出入醫院的次數\n比起以前多了很多", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat0_1 = new SingleTextStatement(
            "這是學習別離的年紀 ……", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat0_2 = new SingleTextStatement(
            "你望著躺卧在病床上的父親\n身上插滿各種儀器,神色難受痛苦", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        DoubleChoiceQuestion Q1 = new DoubleChoiceQuestion(
            "醫生說\n他現在只能用機器勉強維持生命 ……", "同意放棄\n任何急救,\n讓父親離世", "用盡方法\n要父親繼續生存", vrCamera, myGuiModels, SceneSwitchControl.Scene5Q1Name);

        SingleTextStatement Q2_0 = new SingleTextStatement(
            "你不想讓父親繼續承受肉體的折磨", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Q2_1 = new SingleTextStatement(
            "你開始學懂放手", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Q2_A = new SingleTextStatement(
            "你盡可能想讓爸爸活一秒多一秒", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Q2_A1 = new SingleTextStatement(
            "你這樣或許是自私的\n但你的確就是捨不得 ……", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        /* end of adding text contents */


        /* setting next stories or next scenes */

        Stat0_0.AddNextStory(Stat0_1);
        Stat0_1.AddNextStory(Stat0_2);
        Stat0_2.AddNextStory(Q1);
        Q1.AddNextStory(Q2_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q1.AddNextStory(Q2_A, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        Q2_0.AddNextStory(Q2_1);
        Q2_1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                          GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene5bcName);
        Q2_A.AddNextStory(Q2_A1);
        Q2_A1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                           GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene5bcName);


        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat0_0.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
    //public AnimationControl heartBeatAnim;

    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        SingleTextStatement Stat3_3 = new SingleTextStatement(
            "已經將近十時\n你終於可以離開公司\n你拖著疲憊的身子準備回家", 4.5f,
            vrCamera, myGuiModels);

        DoubleChoiceQuestion Q2 = new DoubleChoiceQuestion(
            "此時,你的女朋友Jenny打電話給你\n問今晚可不可以見面", "表示自己\n加班很累\n想要回家休息", "答應Jenny\n和她見面",
            vrCamera, myGuiModels, SceneSwitchControl.Scene3Q2Name);
        Vector3 pos = GuiPrefabUtils.GetSelectionSlider1Text(Q2.underlyingGameObj).gameObject.transform.position;

        GuiPrefabUtils.GetSelectionSlider1Text(Q2.underlyingGameObj).gameObject.transform.position = new Vector3(pos.x, pos.y + 0.2f, pos.z);

        SingleTextStatement Stat4_0 = new SingleTextStatement(
            "「你只管顧著工作吧!不要再找我!」\nJenny忽然向你大發脾氣\n但你沒有感到很意外", 4.5f,
            vrCamera, myGuiModels);

        SingleTextStatement Stat4_1 = new SingleTextStatement(
            "繁忙的工作\n令你少了很多時間和心力\n經營與Jenny的這段關係", 4.5f,
            vrCamera, myGuiModels);

        SingleTextStatement Stat4_2 = new SingleTextStatement(
            "你有時覺得\n是Jenny不體諒自己", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat4_3 = new SingleTextStatement(
            "有時又會想\n難道我專注工作也錯了嗎?", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat4A_0 = new SingleTextStatement(
            "「我覺得我們最近好像很少見面。」", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat4A_1 = new SingleTextStatement(
            "一臉心事的Jenny這樣跟你說\n還和你提出不如大家冷靜一下 ……", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat4A_2 = new SingleTextStatement(
            "你明白Jenny的想法", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        /* end of adding text contents */


        /* setting next stories or next scenes */

        Stat3_3.AddNextStory(Q2);
        Q2.AddNextStory(Stat4_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q2.AddNextStory(Stat4A_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        Stat4_0.AddNextStory(Stat4_1);
        Stat4_1.AddNextStory(Stat4_2);
        Stat4_2.AddNextStory(Stat4_3);
        Stat4_3.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                             GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene3c_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);
        Stat4A_0.AddNextStory(Stat4A_1);
        Stat4A_1.AddNextStory(Stat4A_2);
        Stat4A_2.AddNextStory(Stat4_1);

        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat3_3.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
예제 #9
0
    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        SingleTextStatement Stat2_3 = new SingleTextStatement(
            "有時你覺得家庭是一種甜蜜的負擔\n有時是一副沉重的軛", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        DoubleChoiceQuestion Q2 = new DoubleChoiceQuestion(
            "你女兒有時吵鬧任性,在考試的前一晚\n還吵嚷著要你給她玩iPad", "拒絕女兒要求", "答應女兒要求",
            vrCamera, myGuiModels, SceneSwitchControl.Scene4Q2Name);

        SingleTextStatement Stat3_0 = new SingleTextStatement(
            "女兒感到生氣\n粗暴地把自己房門關上", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        Stat3_0.AddPlayAudioOnUiFadeInComplete(GuiPrefabUtils.SceneSoundEffectVolume, false, closeDoor);

        SingleTextStatement Stat3_1 = new SingleTextStatement(
            "你對女兒亂發脾氣感到相當不滿\n狠狠責罵女兒一頓,她大哭了出來", 7f,
            vrCamera, myGuiModels);

        Stat3_1.AddPlayAudioOnUiFadeInComplete(0.6f, false, girlCry);
        girlCrySource3_1 = Stat3_1.underlyingGameObj.GetComponent <AudioSource>();

        DoubleChoiceQuestion Q3 = new DoubleChoiceQuestion(
            "你見狀一時不忍再罵她\n忽然覺得自己可能也應該道歉", "向女兒道歉\n指自己語氣\n太重了", "保持父親威嚴\n堅拒道歉安慰",
            vrCamera, myGuiModels, SceneSwitchControl.Scene4Q3Name);

        SingleTextStatement Stat3A_0 = new SingleTextStatement(
            "你對她的撒嬌吵嚷看來\n沒什麼辦法,讓她玩了半小時", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat3A_1 = new SingleTextStatement(
            "但有些時候\n女兒實在令你忍不住動怒", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat3A_2 = new SingleTextStatement(
            "有一次\n她不小心打爛了你一瓶心愛的紅酒", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat3A_3 = new SingleTextStatement(
            "你狠狠責罵了女兒一頓\n她第一次看見你這麼生氣\n害怕得哭了出來", 7f,
            vrCamera, myGuiModels);

        Stat3A_3.AddPlayAudioOnUiFadeInComplete(0.6f, false, girlCry);
        girlCrySource3A_3 = Stat3A_3.underlyingGameObj.GetComponent <AudioSource>();

        //SingleTextStatement Stat4_0 = new SingleTextStatement(
        //    "女兒的哭聲慢慢止住\n一顆小小的心開始鎮定下來 ……", GuiPrefabUtils.SingleTextGazeDuration,
        //    vrCamera, myGuiModels);

        //uiFader4_0 = GuiPrefabUtils.GetUiFader(Stat4_0.underlyingGameObj);

        //SingleTextStatement Stat4A_0 = new SingleTextStatement(
        //    "女兒似是被你罵得怕了\n一直哭一直哭,過了很久才終於止住", GuiPrefabUtils.SingleTextGazeDuration,
        //    vrCamera, myGuiModels);

        //uiFader4A_0 = GuiPrefabUtils.GetUiFader(Stat4A_0.underlyingGameObj);

        //SingleTextStatement Stat4A_1 = new SingleTextStatement(
        //    "或者,這會成了你和她\n關係上的一道小缺口", GuiPrefabUtils.SingleTextGazeDuration,
        //    vrCamera, myGuiModels);

        /* end of adding text contents */


        /* setting next stories or next scenes */

        List <AudioSource> sources = new List <AudioSource>(AudSrcsToFadeOut);

        sources.Add(girlCrySource3_1);
        sources.Add(girlCrySource3A_3);

        AudioSource[] audioSources = sources.ToArray();

        Stat2_3.AddNextStory(Q2);
        Q2.AddNextStory(Stat3_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q2.AddNextStory(Stat3A_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        Stat3_0.AddNextStory(Stat3_1);
        Stat3_1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                             GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene4c_0Name, audioSources, GuiPrefabUtils.AudioFadeDuration);
        Stat3A_0.AddNextStory(Stat3A_1);
        Stat3A_1.AddNextStory(Stat3A_2);
        Stat3A_2.AddNextStory(Stat3A_3);
        Stat3A_3.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                              GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene4c_0Name, audioSources, GuiPrefabUtils.AudioFadeDuration);



        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat2_3.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
    //public AnimationControl heartBeatAnim;

    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        SingleTextStatement Stat5_1 = new SingleTextStatement(
            "你之後如願以償地成為田徑校隊\n代校出賽", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        DoubleChoiceQuestion Q5 = new DoubleChoiceQuestion(
            "今天練習結束的時候\n你看見同班同學Jenny獨自一人\n沒精打彩地坐在籃球場外的長櫈上", "買一枝水\n過去請Jenny喝", "裝作沒看見\n獨自離校",
            vrCamera, myGuiModels, SceneSwitchControl.Scene2Q5Name);

        Q5.AddStoreTwoSelectionChoice(SceneSwitchControl.Scene2Q5Name);

        SingleTextStatement Stat6_0 = new SingleTextStatement(
            "你關心Jenny\n為什麼看起來一臉心事", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat6_1 = new SingleTextStatement(
            "原來\nJenny父母希望她這年專心應付公開試\n想Jenny退出籃球隊", 4.5f,
            vrCamera, myGuiModels);

        SingleTextStatement Stat6_2 = new SingleTextStatement(
            "你把自己加入田徑校隊的經歷告訴Jenny ……", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat6_3 = new SingleTextStatement(
            "你的故事似乎鼓舞了Jenny\nJenny展露出笑容\n你和Jenny成為了好朋友", 4.5f,
            vrCamera, myGuiModels);

        /* end of adding text contents */


        /* setting next stories or next scenes */


        Stat5_1.AddNextStory(Q5);
        Q5.AddNextStory(Stat6_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Stat6_0.AddNextStory(Stat6_1);
        Stat6_1.AddNextStory(Stat6_2);
        Stat6_2.AddNextStory(Stat6_3);
        Stat6_3.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration,
                             SceneSwitchControl.Scene2hName, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);
        Q5.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene2hName,
                        DoubleChoiceQuestion.SelectionSlider1Or2.Slider2, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);

        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat5_1.SetAsStartGui(storyStartManager);


        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        DoubleTextStatement Stat2_2_0 = new DoubleTextStatement(Color.white,
                                                                "- 60歲 -", "你開始邁向退休的年紀",
                                                                GuiPrefabUtils.DoubleTextFirstGazeDuration, GuiPrefabUtils.DoubleTextSecondGazeDuration,
                                                                vrCamera, myGuiModels);

        SingleTextStatement Stat2_2_1 = new SingleTextStatement(Color.white,
                                                                "女兒也已經30歲\n到了結婚的年齡", GuiPrefabUtils.SingleTextGazeDuration,
                                                                vrCamera, myGuiModels);

        SingleTextStatement Stat2_3 = new SingleTextStatement(Color.white,
                                                              "看著她也擁有自己的家庭\n你感到放心安慰", GuiPrefabUtils.SingleTextGazeDuration,
                                                              vrCamera, myGuiModels);

        DoubleChoiceQuestion Q2 = new DoubleChoiceQuestion(Color.white,
                                                           "她要搬離你的家\n和她的丈夫一起居住了 ……", "無奈接受", "欣然接受", vrCamera, myGuiModels, SceneSwitchControl.Scene5Q2Name);

        SingleTextStatement Stat3_0 = new SingleTextStatement(Color.white,
                                                              "這時你才發現,原來你不捨得", GuiPrefabUtils.SingleTextGazeDuration,
                                                              vrCamera, myGuiModels);

        SingleTextStatement Stat3_1 = new SingleTextStatement(Color.white,
                                                              "她已經長大了,你無從改變 ……", GuiPrefabUtils.SingleTextGazeDuration,
                                                              vrCamera, myGuiModels);

        DoubleTextStatement Stat3_2_0 = new DoubleTextStatement(Color.white,
                                                                "- 82歲 -", "你患上末期癌症,需要長期進出醫院",
                                                                GuiPrefabUtils.DoubleTextFirstGazeDuration, GuiPrefabUtils.DoubleTextSecondGazeDuration,
                                                                vrCamera, myGuiModels);

        SingleTextStatement Stat3_2_1 = new SingleTextStatement(Color.white,
                                                                "你回來了", GuiPrefabUtils.SingleTextGazeDuration,
                                                                vrCamera, myGuiModels);

        Stat3_2_1.AddPlayAudioOnUiFadeInComplete(GuiPrefabUtils.SceneSoundEffectVolume, false, hospitalCurtainClip);

        SingleTextStatement Stat3_3 = new SingleTextStatement(Color.white,
                                                              "你年老乏力的身體\n就如嬰孩時期般軟弱無力", GuiPrefabUtils.SingleTextGazeDuration,
                                                              vrCamera, myGuiModels);

        scene5Q3ClipSource = Stat3_3.AddPlayAudioOnUiFadeInComplete(GuiPrefabUtils.SceneSoundEffectVolume, true, scene5Q3Clip);

        SingleTextStatement Stat3_4 = new SingleTextStatement(Color.white,
                                                              "當你看到你女兒、女婿、\n孫子、親友全都圍在你床邊\n文珊靠在你床邊,哭成淚人的樣子時 ……",
                                                              6f, vrCamera, myGuiModels);

        SingleTextStatement Stat3_5 = new SingleTextStatement(Color.white,
                                                              "你就意識到自己是差不多走到盡頭了", 4f, vrCamera, myGuiModels);

        SingleTextStatement Stat3_6 = new SingleTextStatement(Color.white,
                                                              "你忽然想起過往很多和文珊的經歷片段", 4f, vrCamera, myGuiModels);

        SingleTextStatement Stat3_7 = new SingleTextStatement(Color.white,
                                                              "第一次約會、第一次吵架、結婚、生小孩、\n一起為工作煩惱、一起為小孩擔憂、\n互相鼓勵、互相安慰 ……",
                                                              6f, vrCamera, myGuiModels);

        DoubleChoiceQuestion Q3 = new DoubleChoiceQuestion(Color.white,
                                                           "慢慢的\n你的臉頰也流下了兩行淚水 ……", "默然不語", "跟文珊說:\n「謝謝你,\n我愛你。」",
                                                           vrCamera, myGuiModels, SceneSwitchControl.Scene5Q3Name);

        Vector3 pos2 = GuiPrefabUtils.GetSelectionSlider2Text(Q3.underlyingGameObj).gameObject.transform.position;

        GuiPrefabUtils.GetSelectionSlider2Text(Q3.underlyingGameObj).gameObject.transform.position = new Vector3(pos2.x, pos2.y + 0.2f, pos2.z);

        SingleTextStatement Stat4_0 = new SingleTextStatement(Color.white,
                                                              "這就是你的理想人生嗎?\n有時你會這樣問自己", 4f,
                                                              vrCamera, myGuiModels);

        scene5Q4ClipSource = Stat4_0.AddPlayAudioOnUiFadeInReachThreshold(0.5f, true, scene5Q4Clip, 0f);

        SingleTextStatement Stat4_1 = new SingleTextStatement(Color.white,
                                                              "漸漸的,你又開始聽到心臟微微的跳動\n感受到身體被一種暖流包裹", 4f,
                                                              vrCamera, myGuiModels);

        Stat4_1UiFader = GuiPrefabUtils.GetUiFader(Stat4_1.underlyingGameObj);
        //heartbeatAudio = Stat4_1.AddPlayAudioOnUiFadeInComplete(GuiPrefabUtils.SceneSoundEffectVolume, true, heartbeatClip);
        Stat4_1.AddPlayAnimationOnUiFadeInComplete(heartbeatAnimationControl);

        SingleTextStatement Stat4_2 = new SingleTextStatement(Color.white,
                                                              "生命,悄悄消逝 ……", 4f,
                                                              vrCamera, myGuiModels);

        SingleChoiceQuestion Q4 = new SingleChoiceQuestion(Color.white,
                                                           "你願意離開這個世界\n結束這一趟人生旅程嗎?", "我願意", vrCamera, myGuiModels);

        Q4UiFader = GuiPrefabUtils.GetUiFader(Q4.underlyingGameObj);
        scene5Q4LoopClipSource  = Q4.AddPlayAudioOnUiFadeInReachThreshold(GuiPrefabUtils.SceneSoundEffectVolume, true, scene5Q4LoopClip, 0f);
        passAwaySelectionSlider = GuiPrefabUtils.GetSelectionSlider(Q4.underlyingGameObj);
        Q4.SetOnFilledAudioClipForSlider(null);

        SingleTextStatement Stat4_A = new SingleTextStatement(Color.white,
                                                              "「我也愛你。」\n文珊抹一抹眼淚,跟你說", 4f,
                                                              vrCamera, myGuiModels);

        SingleTextStatement End_1 = new SingleTextStatement(Color.white,
                                                            "人生 …… 總是經歷選擇、擁有與失去\n你未必可以完全掌控你的人生\n更無法回到過去再來一次",
                                                            GuiPrefabUtils.LastSceneSingleTextGazeDuration, vrCamera, myGuiModels);

        //UIFader End_1UiFader = GuiPrefabUtils.GetUiFader(End_1.underlyingGameObj);
        //End_1UiFader.m_FadeSpeed = 0.2f;

        SingleTextStatement End_2 = new SingleTextStatement(Color.white,
                                                            "但是 …… 以甚麼心態面對人生起跌\n如何與你覺得重要的人相處\n是可以由你來決定",
                                                            GuiPrefabUtils.LastSceneSingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_3 = new SingleTextStatement(Color.white,
                                                            "人,只可活一次!",
                                                            GuiPrefabUtils.LastSceneSingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_4 = new SingleTextStatement(Color.white,
                                                            "回到現實,你會如何繼續你的人生呢?",
                                                            GuiPrefabUtils.LastSceneSingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_5 = new SingleTextStatement(Color.white,
                                                            "(請脫下眼鏡,遵循工作人員指示離開)",
                                                            3600f, vrCamera, myGuiModels);

        //SingleTextStatement

        /* end of adding text contents */


        /* setting next stories or next scenes */

        Stat2_2_0.AddNextStory(Stat2_2_1);
        Stat2_2_1.AddNextStory(Stat2_3);
        Stat2_3.AddNextStory(Q2);
        Q2.AddNextStory(Stat3_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q2.AddNextStory(Stat3_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        Stat3_0.AddNextStory(Stat3_1);
        Stat3_1.AddNextStory(Stat3_2_0);
        Stat3_2_0.AddNextStory(Stat3_2_1);
        Stat3_2_1.AddNextStory(Stat3_3);
        Stat3_3.AddNextStory(Stat3_4);
        Stat3_4.AddNextStory(Stat3_5);
        Stat3_5.AddNextStory(Stat3_6);
        Stat3_6.AddNextStory(Stat3_7);
        Stat3_7.AddNextStory(Q3);
        Q3.AddNextStory(Stat4_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q3.AddNextStory(Stat4_A, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        Stat4_0.AddNextStory(Stat4_1);
        Stat4_1.AddNextStory(Stat4_2);
        Stat4_2.AddNextStory(Q4);
        Stat4_A.AddNextStory(Stat4_0);
        //Q4.AddNextScene(vrCamera.GetComponent<VRCameraFade>(),
        //    GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene5dName);
        Q4.AddNextStory(End_1);
        End_1.AddNextStory(End_2);
        End_2.AddNextStory(End_3);
        End_3.AddNextStory(End_4);
        End_4.AddNextStory(End_5);

        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat2_2_0.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
예제 #12
0
    //public AnimationControl heartBeatAnim;

    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */
        SingleTextStatement Stat0_0 = new SingleTextStatement(
            "三十而立\n你開始建立起自己的家庭", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat0_1 = new SingleTextStatement(
            "你的人生展開了新一章\n對於自己成為爸爸\n你又驚又喜 ……", 4.5f,
            vrCamera, myGuiModels);

        SingleTextStatement Stat0_2 = new SingleTextStatement(
            "同樣感到驚喜的,還有你媽媽\n她得知自己有孫女後,十分欣喜", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        DoubleChoiceQuestion Q1 = new DoubleChoiceQuestion(
            "你媽媽提議她搬到你家住幾個月\n幫忙照顧文珊和孫女\n然而文珊卻似乎不太情願 ……", "接受媽媽的建議", "聽從文珊的\n意願,婉拒媽媽",
            vrCamera, myGuiModels, SceneSwitchControl.Scene4Q1Name);

        //Q1.AddStoreTwoSelectionChoice(SceneSwitchControl.Scene2Q1Name);

        SingleTextStatement Stat2_0 = new SingleTextStatement(
            "文珊的確不太高興。有些日子\n文珊和你媽媽在家中都為著\n一些事情發生小爭執",
            4.5f, vrCamera, myGuiModels);

        SingleTextStatement Stat2_1 = new SingleTextStatement(
            "夾著中間的你,尤其煩惱", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement Stat2_2_0 = new SingleTextStatement(
            "當一個兒子,當一個丈夫\n真不是一件容易的事;而你現在 ……", 4.5f, vrCamera, myGuiModels);

        SingleTextStatement Stat2_2_1 = new SingleTextStatement(
            "還要當一個父親了", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement Stat2_A = new SingleTextStatement(
            "你媽媽似乎不理解\n你為什麼拒絕自己的好事\n為此和你爭執了一小段日子",
            4.5f, vrCamera, myGuiModels);


        /* end of adding text contents */


        /* setting next stories or next scenes */

        Stat0_0.AddNextStory(Stat0_1);
        Stat0_1.AddNextStory(Stat0_2);
        Stat0_2.AddNextStory(Q1);
        Q1.AddNextStory(Stat2_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q1.AddNextStory(Stat2_A, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        Stat2_0.AddNextStory(Stat2_1);
        Stat2_1.AddNextStory(Stat2_2_0);
        Stat2_A.AddNextStory(Stat2_2_0);
        Stat2_2_0.AddNextStory(Stat2_2_1);
        Stat2_2_1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                               GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene4b_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);

        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat0_0.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
예제 #13
0
    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        SingleTextStatement Stat5_2 = new SingleTextStatement(
            "你找到一間年輕的企業\n沒有大公司的穩定保障\n但也沒有太多傳統規矩、\n壁壘分明的上司下屬關係 ……",
            4.5f, vrCamera, myGuiModels);

        SingleTextStatement Stat5_3 = new SingleTextStatement(
            "雖然工作有時也會很繁忙\n但這公司明顯更符合你的個性",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement Stat5_4 = new SingleTextStatement(
            "在公司工作多年\n漸漸得到上司賞識和晉升機會",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement Stat5_5 = new SingleTextStatement(
            "你偶爾瀏覽Facebook\n剛發現Jenny發佈了一張新照片\n她和新男友甜蜜合照",
            4.5f, vrCamera, myGuiModels);

        SingleTextStatement Stat5_6 = new SingleTextStatement(
            "你望著照片,祝福她、感謝她\n是她令你重新掌握到自己生活的節奏\n留意身邊的人和事",
            4.5f, vrCamera, myGuiModels);

        DoubleChoiceQuestion Q4 = new DoubleChoiceQuestion(
            "此時\n坐在你旁邊的新入職同事文珊\n對著電腦螢幕一臉緊張地敲打鍵盤", "沖一杯咖啡\n給文珊\n為她打氣", "笑笑不理\n繼續自己的工作",
            vrCamera, myGuiModels, SceneSwitchControl.Scene3Q4Name);

        Vector3 pos2 = GuiPrefabUtils.GetSelectionSlider1Text(Q4.underlyingGameObj).gameObject.transform.position;

        GuiPrefabUtils.GetSelectionSlider1Text(Q4.underlyingGameObj).gameObject.transform.position = new Vector3(pos2.x, pos2.y + 0.2f, pos2.z);

        SingleTextStatement End_0 = new SingleTextStatement(
            "文珊感謝你的體貼關心\n跟你分享工作上的煩惱",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_1 = new SingleTextStatement(
            "你聽著文珊的煩惱,彷彿想起當年\n剛畢業投身工作的自己",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_2 = new SingleTextStatement(
            "「不要緊的\n這個問題可以解決得了。」\n你提供意見,幫助文珊",
            4.5f, vrCamera, myGuiModels);

        SingleTextStatement End_3 = new SingleTextStatement(
            "對,不要緊的\n問題始終可以解決得了 ……",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement EndA_0 = new SingleTextStatement(
            "你望著文珊煩惱的樣子\n彷彿想起當年剛畢業\n投身工作的自己",
            4.5f, vrCamera, myGuiModels);

        SingleTextStatement EndA_1 = new SingleTextStatement(
            "或許每個人都需要經歷\n一次進入社會的迷惘吧?",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement EndA_2 = new SingleTextStatement(
            "「不要緊的,問題始終可以解決得了。」\n你心裡這樣想",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement EndA_3 = new SingleTextStatement(
            "你心裡這樣相信", GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        /* end of adding text contents */


        /* setting next stories or next scenes */

        Stat5_2.AddNextStory(Stat5_3);
        Stat5_3.AddNextStory(Stat5_4);
        Stat5_4.AddNextStory(Stat5_5);
        Stat5_5.AddNextStory(Stat5_6);
        Stat5_6.AddNextStory(Q4);
        Q4.AddNextStory(End_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q4.AddNextStory(EndA_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        End_0.AddNextStory(End_1);
        End_1.AddNextStory(End_2);
        End_2.AddNextStory(End_3);
        End_3.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                           GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene4a_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);
        EndA_0.AddNextStory(EndA_1);
        EndA_1.AddNextStory(EndA_2);
        EndA_2.AddNextStory(EndA_3);
        EndA_3.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                            GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene4a_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);



        /* end of setting next stories or next scenes */


        /* setting start gui */

        //Stat5_2.SetAsStartGui(storyStartManager);
        storyStartManager.m_LastQuestionIdentifier  = SceneSwitchControl.Scene3Q3Name;
        storyStartManager.m_Option1StartFader       = GuiPrefabUtils.GetUiFader(Stat5_2.underlyingGameObj);
        storyStartManager.m_Option1StartTextForGaze = GuiPrefabUtils.GetTextForGaze(Stat5_2.underlyingGameObj);
        storyStartManager.m_Option2StartFader       = GuiPrefabUtils.GetUiFader(Stat5_4.underlyingGameObj);
        storyStartManager.m_Option2StartTextForGaze = GuiPrefabUtils.GetTextForGaze(Stat5_4.underlyingGameObj);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
예제 #14
0
    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        SingleTextStatement Stat0_0 = new SingleTextStatement(
            "資料搜集、會議報告、\n匯報書、報價表、採購表、\n訂單、合約 ……", 4.0f,
            vrCamera, myGuiModels);

        SingleTextStatement Stat0_1 = new SingleTextStatement(
            "辦公桌上,堆積不同的工作文件\n你預計自己可能又要加班了", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        DoubleChoiceQuestion Q1 = new DoubleChoiceQuestion(
            "你繼續準備計劃書\n發現同事負責的部分有幾個錯誤", "裝作看不見", "自行幫同事\n修正錯誤",
            vrCamera, myGuiModels, SceneSwitchControl.Scene3Q1Name);

        SingleTextStatement Stat3_0 = new SingleTextStatement(
            "你的辦公電話響起\n同事拜託你校對整份匯報文件\n改正錯漏", 4.5f,
            vrCamera, myGuiModels);

        Stat3_0.AddPlayAudioOnUiFadeInComplete(GuiPrefabUtils.SceneSoundEffectVolume, false, phoneCall);



        SingleTextStatement Stat3_1 = new SingleTextStatement(
            "你開始懷疑\n你同事是故意把自己的工作卸給你的\n你沒有太多選擇的餘地", 4.5f,
            vrCamera, myGuiModels);

        //SingleTextStatement Stat3_3 = new SingleTextStatement(
        //    "已經將近十時\n你終於可以離開公司\n你拖著疲憊的身子準備回家", 4.5f,
        //    vrCamera, myGuiModels);


        /* end of adding text contents */


        /* setting next stories or next scenes */

        Stat0_0.AddNextStory(Stat0_1);
        Stat0_1.AddNextStory(Q1);
        Q1.AddNextStory(Stat3_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(), GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene3bName,
                        DoubleChoiceQuestion.SelectionSlider1Or2.Slider2, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);
        Stat3_0.AddNextStory(Stat3_1);
        Stat3_1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                             GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene3bName, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);



        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat0_0.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
    //public AnimationControl heartBeatAnim;

    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        SingleTextStatement Stat4_1 = new SingleTextStatement(
            "到了這個年紀\n你要顧的,早就不只是一個家", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat4_2 = new SingleTextStatement(
            "這天早上\n文珊忘記攜帶女兒小學面試用的作品集\n要你連忙送回", 4.5f,
            vrCamera, myGuiModels);

        SingleTextStatement Stat4_3 = new SingleTextStatement(
            "就在你趕往學校途中\n你收到一個電話 ……", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        DoubleChoiceQuestion Q4 = new DoubleChoiceQuestion(
            "「你媽媽忽然暈倒送院了\n醫生說情況很危急 ……」\n爸爸焦急地說", "不差十分鐘\n先去學校", "立即改道到醫院",
            vrCamera, myGuiModels, SceneSwitchControl.Scene4Q4Name);

        SingleTextStatement Stat5_0 = new SingleTextStatement(
            "為了女兒的升學\n你看不見你媽媽離世前\n最後一面了 ……", 4.5f,
            vrCamera, myGuiModels);

        SingleTextStatement Stat5_1 = new SingleTextStatement(
            "媽媽離世後\n你把爸爸也接過來一起居住", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat5_2 = new SingleTextStatement(
            "隨著年月\n你爸爸身體日漸變差\n已經需要別人貼身照顧", 4.5f,
            vrCamera, myGuiModels);

        SingleTextStatement Stat5_3 = new SingleTextStatement(
            "你考慮過送他到老人院\n但擔心他不喜歡", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        DoubleChoiceQuestion Q5 = new DoubleChoiceQuestion(
            "請一個有醫護知識的傭人\n在家貼身照顧也是一個選擇\n但價錢是老人院院費的兩倍", "聘請醫護傭人", "安排爸爸\n入住老人院",
            vrCamera, myGuiModels, SceneSwitchControl.Scene4Q5Name);

        SingleTextStatement Stat5A_0 = new SingleTextStatement(
            "你十分擔心媽媽的狀況\n趕赴醫院", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat5A_1 = new SingleTextStatement(
            "女兒也許上不到那所心儀的小學了\n但你趕得及見媽媽的最後一面", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat5A_2 = new SingleTextStatement(
            "你媽媽臨終前看見你\n展現了欣慰的笑容 ……", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat6A_0 = new SingleTextStatement(
            "你爸爸很不滿、失望\n他不情願住老人院;但你認為\n這已經是最好方案了",
            4.5f, vrCamera, myGuiModels);

        SingleTextStatement Stat6A_1 = new SingleTextStatement(
            "你把這件事告訴文珊\n她的回應卻超乎你的意料",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement Stat6A_2 = new SingleTextStatement(
            "她認為應該為你爸爸聘請醫護傭人\n還向你說:\n「我還有些私己錢,我們一同分擔吧!」",
            4.5f, vrCamera, myGuiModels);

        SingleTextStatement End_0 = new SingleTextStatement(
            "你不想讓爸爸住老人院\n但你又擔心文珊會反對\n你聘請醫護傭人",
            GuiPrefabUtils.SingleTextGazeDuration, vrCamera, myGuiModels);

        SingleTextStatement End_1 = new SingleTextStatement(
            "然而,文珊的支持卻超乎你意料\n還向你說:\n「我還有些私己錢,我們一同分擔吧!」",
            4.5f, vrCamera, myGuiModels);

        SingleTextStatement End_2 = new SingleTextStatement(
            "維持一個家不是一件容易的事\n需要忍耐、包容、犧牲...\n你慶幸有她,陪伴你,在這一路上",
            4.5f, vrCamera, myGuiModels);

        /* end of adding text contents */


        /* setting next stories or next scenes */


        Stat4_1.AddNextStory(Stat4_2);
        Stat4_2.AddNextStory(Stat4_3);
        Stat4_3.AddNextStory(Q4);
        Q4.AddNextStory(Stat5_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q4.AddNextStory(Stat5A_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        Stat5_0.AddNextStory(Stat5_1);
        Stat5_1.AddNextStory(Stat5_2);
        Stat5_2.AddNextStory(Stat5_3);
        Stat5_3.AddNextStory(Q5);
        Stat5A_0.AddNextStory(Stat5A_1);
        Stat5A_1.AddNextStory(Stat5A_2);
        Stat5A_2.AddNextStory(Stat5_1);
        Q5.AddNextStory(End_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q5.AddNextStory(Stat6A_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);

        Stat6A_0.AddNextStory(Stat6A_1);
        Stat6A_1.AddNextStory(Stat6A_2);
        Stat6A_2.AddNextStory(End_2);
        //Stat6_0.AddNextStory(Stat6_1);
        //Stat6_1.AddNextStory(Stat6_3);
        //Stat6_3.AddNextStory(Q6);
        //Stat6A_1.AddNextStory(Stat6_3);
        //Q6.AddNextStory(End_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        //Q6.AddNextStory(EndA_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        End_0.AddNextStory(End_1);
        End_1.AddNextStory(End_2);
        End_2.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                           GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene5a_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);
        //EndA_0.AddNextStory(EndA_1);
        //EndA_1.AddNextScene(vrCamera.GetComponent<VRCameraFade>(),
        //    GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene5a_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);

        /* end of setting next stories or next scenes */


        /* setting start gui */

        Stat4_1.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }
    private void Awake()
    {
        IList <GuiModelBase> myGuiModels = new List <GuiModelBase>();


        /* adding text contents */

        DoubleChoiceQuestion Q6 = new DoubleChoiceQuestion(
            "你抽中了兩張演唱會的門卷\n想邀請Jenny一同觀看,可是演唱會的日子\n正是校內模擬試的備試時期", "依然邀請Jenny\n一同觀看", "把演唱會門票\n送給別人\n專注預備模擬試",
            vrCamera, myGuiModels, SceneSwitchControl.Scene2Q5Name);

        Vector3 pos = GuiPrefabUtils.GetSelectionSlider2Text(Q6.underlyingGameObj).gameObject.transform.position;

        GuiPrefabUtils.GetSelectionSlider2Text(Q6.underlyingGameObj).gameObject.transform.position = new Vector3(pos.x, pos.y + 0.2f, pos.z);

        SingleTextStatement End_0 = new SingleTextStatement(
            "Jenny答應了你\n你們一起去了聽演唱會\n渡過了一個愉快的晚上", 4.5f,
            vrCamera, myGuiModels);

        SingleTextStatement End_1 = new SingleTextStatement(
            "代價是\n你的模擬試也考得一塌糊塗", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement End_2 = new SingleTextStatement(
            "「已經追不上了吧?」\n你對考大學失去了信心", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement End_3 = new SingleTextStatement(
            "考不上大學的話\n我應該怎麼辦?\n未來,應該怎麼辦?", 4.0f,
            vrCamera, myGuiModels);

        SingleTextStatement End_5 = new SingleTextStatement(
            "但你開始問自己這個問題的時候\n那就意味著", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement End_6 = new SingleTextStatement(
            "你長大了 ……", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement Stat6A_0 = new SingleTextStatement(
            "你其實對這樣重覆的生活感到厭悶", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        DoubleChoiceQuestion Q6A = new DoubleChoiceQuestion(
            "有一天,你抽中了演唱會的門券\n想找朋友一同觀看,可是演唱會的日子\n正是校內模擬試的前夕", "依然邀請朋友\n一同觀看", "把演唱會門票\n送給別人\n專注預備模擬試",
            vrCamera, myGuiModels, SceneSwitchControl.Scene2Q5Name);

        Vector3 pos2 = GuiPrefabUtils.GetSelectionSlider2Text(Q6A.underlyingGameObj).gameObject.transform.position;

        GuiPrefabUtils.GetSelectionSlider2Text(Q6A.underlyingGameObj).gameObject.transform.position = new Vector3(pos2.x, pos2.y + 0.2f, pos2.z);

        SingleTextStatement EndA_0 = new SingleTextStatement(
            "演唱會十分精彩\n你和朋友們享受了愉快的一天", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement EndA_1 = new SingleTextStatement(
            "代價是\n你的模擬試也考得一塌糊塗", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement EndB_0 = new SingleTextStatement(
            "你始終覺得\n應付公開試比較重要", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement EndB_1 = new SingleTextStatement(
            "你憧憬著大學美好的生活\n這使你讀書更加有動力", GuiPrefabUtils.SingleTextGazeDuration,
            vrCamera, myGuiModels);

        SingleTextStatement EndB_2 = new SingleTextStatement(
            "大學生活\n到底是怎樣的呢?\n未來,到底是怎樣的呢?", 4.0f,
            vrCamera, myGuiModels);

        /* end of adding text contents */


        /* setting next stories or next scenes */

        Q6.AddNextStory(End_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q6.AddNextStory(EndB_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        End_0.AddNextStory(End_1);
        End_1.AddNextStory(End_2);
        End_2.AddNextStory(End_3);
        End_3.AddNextStory(End_5);
        End_5.AddNextStory(End_6);
        End_6.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                           GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene3a_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);

        EndB_0.AddNextStory(EndB_1);
        EndB_1.AddNextStory(EndB_2);
        EndB_2.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                            GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene3a_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);

        Stat6A_0.AddNextStory(Q6A);
        Q6A.AddNextStory(EndA_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider1);
        Q6A.AddNextStory(EndB_0, DoubleChoiceQuestion.SelectionSlider1Or2.Slider2);
        EndA_0.AddNextStory(EndA_1);
        EndA_1.AddNextScene(vrCamera.GetComponent <VRCameraFade>(),
                            GuiPrefabUtils.CameraFadeDuration, SceneSwitchControl.Scene3a_0Name, AudSrcsToFadeOut, GuiPrefabUtils.AudioFadeDuration);

        /* end of setting next stories or next scenes */


        /* setting start gui */

        twoChoiceStoryStartManager.m_LastQuestionIdentifier  = SceneSwitchControl.Scene2Q5Name;
        twoChoiceStoryStartManager.m_Option1StartFader       = GuiPrefabUtils.GetUiFader(Q6.underlyingGameObj);
        twoChoiceStoryStartManager.m_Option1StartTextForGaze = GuiPrefabUtils.GetTextForGaze(Q6.underlyingGameObj);
        twoChoiceStoryStartManager.m_Option2StartFader       = GuiPrefabUtils.GetUiFader(Stat6A_0.underlyingGameObj);
        twoChoiceStoryStartManager.m_Option2StartTextForGaze = GuiPrefabUtils.GetTextForGaze(Stat6A_0.underlyingGameObj);

        //Stat5_1.SetAsStartGui(storyStartManager);

        /* end of setting start gui */


        /* activating guis */
        // [Important] This is needed because the prefab game objects are set to be inactive so that the OnEnable event is not called during Prefab Instantiation.

        foreach (GuiModelBase myGuiModel in myGuiModels)
        {
            myGuiModel.SetActive(true);
        }

        /* end of activating guis */
    }