Ejemplo n.º 1
0
        IEnumerator CreateZhiRuo()
        {
            GameObject myplayer = null;

            while (myplayer == null)
            {
                yield return(new WaitForSeconds(1));

                myplayer = ObjectManager.objectManager.GetMyPlayer();
            }

            var myp = new GameObject("TempNpcPos");

            yield return(new WaitForSeconds(1));

            myp.transform.position = myplayer.transform.position + new Vector3(Random.Range(-3.0f, 3.0f), 0.2f, Random.Range(-3.0f, 3.0f));
            ObjectManager.objectManager.CreateNpc(Util.GetNpcData(20008), myp);

            string[] text = new string[] {
                "至若:哥哥,这里真的有苍冥水么",
                "我也不知道,咱们先看看吧",
            };
            NpcDialogInterface.ShowTextList(text, null);

            yield return(StartCoroutine(eh.WaitEvt(MyEvent.EventType.EnterNextZone)));

            text = new string[] {
                "至若:为何寻了半天也没见苍冥水的踪迹?",
                "难道因为魔神苏醒,连苍冥水也被毁掉了?",
                "至若:若是如此那可怎么办?",
                "现在也只能走一步看一步了",
            };
            NpcDialogInterface.ShowTextList(text, null);

            yield return(StartCoroutine(eh.WaitEvt(MyEvent.EventType.BossSpawn)));

            var sover = false;

            text = new string[] {
                "wu.......",
                "至若:这是什么声音?",
                "至若小心。",
            };
            NpcDialogInterface.ShowTextList(text, () => sover = true);
            while (!sover)
            {
                yield return(null);
            }

            MyEventSystem.PushEventStatic(MyEvent.EventType.SpeakOver);

            yield return(StartCoroutine(eh.WaitEvt(MyEvent.EventType.BossDead)));

            text = new string[] {
                "至若:那闪闪发光的是什么东西?",
                "好像是一个瓶子,有一股清幽之气",
                "至若:先收起来吧,回去问问巨牙子爷爷",
            };

            bool over = false;

            NpcDialogInterface.ShowTextList(text, () => {
                over = true;
            });
            while (!over)
            {
                yield return(null);
            }
            GameInterface_Player.SetIntState(GameBool.cunZhangState, 5);
            yield return(StartCoroutine(eh.WaitEvt(MyEvent.EventType.LevelFinish)));

            text = new string[] {
                "幽冥之中传来一阵笑声,嘿嘿嘿",
            };
            over = false;
            NpcDialogInterface.ShowTextList(text, () => {
                over = true;
            });
            while (!over)
            {
                yield return(null);
            }


            BattleManager.battleManager.GameOver();
        }
Ejemplo n.º 2
0
        //Load 主城剧情 如何表现CG 镜头控制 运用
        //加载主城场景
        //跨场景的剧情
        //场景暗下来 主镜头关闭
        IEnumerator StoryProgress()
        {
            yield return(StartCoroutine(NpcDialogInterface.WaitPlayerInit()));

            var text = new string[] {
                "是夜,你独自一人闯入了试炼之地,与此同时, 在村中",
            };

            yield return(StartCoroutine(NpcDialogInterface.WaitHandler(
                                            (cb) => {
                NpcDialogInterface.ShowTextList(text, () => {
                    cb();
                }
                                                );
            })));

            NpcDialogInterface.SetBlackAndStopAI();
            text = new string[] {
                "至若:东湖哥哥,你怎么了,夜里来这里干什么?",
                "东湖:我... 我... 我也不知道怎么了,只觉得胸中热气鼓荡,神不知鬼不觉就来到这里了",
                "至若:你不会魔气未净, 我去找巨牙子爷爷",
                "东湖:我... 我... 嘿嘿,小姑娘,不用去了,本王要借你的至阴之气一用",
                "至若:东湖哥哥你怎么了,为何突然说话声音变了, 东湖哥哥 东湖哥哥 ,东... 湖... 哥..., 我头有点晕...",
                "是夜,一夜无话",
            };
            yield return(StartCoroutine(
                             NpcDialogInterface.WaitHandler((cb) => {
                NpcDialogInterface.ShowTextList(text, () => {
                    cb();
                });
            })
                             ));

            NpcDialogInterface.ResetBlackAndAI();


            text = new string[] {
                "自从那日与魔神交手之后,心中总是有不详预感,不知道现在村子里面怎么样了,等找到父母留下的宝物,就尽快回去了",
            };

            yield return(StartCoroutine(
                             NpcDialogInterface.WaitHandler((cb) => {
                NpcDialogInterface.ShowTextList(text, () => {
                    cb();
                });
            })
                             ));

            yield return(StartCoroutine(eh.WaitEvt(MyEvent.EventType.EnterNextZone)));

            text = new string[] {
                "前方为何散发出幽幽蓝光,难道宝物就在那里",
            };
            yield return(StartCoroutine(
                             NpcDialogInterface.WaitHandler((cb) => {
                NpcDialogInterface.ShowTextList(text, () => {
                    cb();
                });
            })
                             ));

            yield return(StartCoroutine(eh.WaitEvt(MyEvent.EventType.BossSpawn)));

            text = new string[] {
                "???:我被困在这匣子里面整整一千年了,刑木,你怕是早就死了吧哈哈哈",
                "你是何方妖魔,竟敢直呼我先祖的名讳",
                "小娃娃,刚好,我已千年没有进食了,正好吃掉你,解解馋",
            };
            yield return(StartCoroutine(
                             NpcDialogInterface.WaitHandler((cb) => {
                NpcDialogInterface.ShowTextList(text, () => {
                    cb();
                });
            })
                             ));

            MyEventSystem.PushEventStatic(MyEvent.EventType.SpeakOver);

            yield return(StartCoroutine(eh.WaitEvt(MyEvent.EventType.BossDead)));

            text = new string[] {
                "这散落一地的宝石,似乎蕴含着极大的力量,回去问问巨牙子爷爷",
            };

            yield return(StartCoroutine(
                             NpcDialogInterface.WaitHandler((cb) => {
                NpcDialogInterface.ShowTextList(text, () => {
                    cb();
                });
            })
                             ));

            yield return(StartCoroutine(eh.WaitEvt(MyEvent.EventType.LevelFinish)));

            BattleManager.battleManager.GameOver();
            GameInterface_Player.SetIntState(GameBool.cunZhangState, 11);
        }