private IEnumerator UpdateNPCTalkingAfterBreakedBariier()
    {
        GameSceneTables.SectionData sectionData = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSection().sectionData;

        Player hound_A  = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[0] as Player;
        Player hound_B  = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[1] as Player;
        Player beginner = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[2] as Player;

        hound_B.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_9"));
        yield return((object)new WaitForSeconds(4f));

        hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_10"));
        yield return((object)new WaitForSeconds(4f));

        beginner.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_11"));
        yield return((object)new WaitForSeconds(20f));

        hound_B.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_12"));
        EnemyBrain brain = enemy.GetComponentInChildren <EnemyBrain>();

        for (int i = 0; i < brain.actionCtrl.actions.Count; i++)
        {
            brain.actionCtrl.actions[i].isForceDisable = (i != 14);
            finish = true;
        }
        yield return((object)new WaitForSeconds(5f));

        hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_13"));
        yield return((object)null);
    }
예제 #2
0
    public string GetNPCMessageBySectionData(GameSceneTables.SectionData sectionData)
    {
        Section section = GetSection(sectionData.sectionName + "_TEXT");

        if (section != null)
        {
            return(section.GetNPCMessage()?.message);
        }
        return(sectionData.GetText("NPC_MESSAGE_" + Random.Range(0, 3)));
    }
    private IEnumerator UpdateNPCTalking()
    {
        GameSceneTables.SectionData sectionData = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSection().sectionData;

        yield return((object)new WaitForSeconds(5f));

        Player hound_A  = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[0] as Player;
        Player hound_B  = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[1] as Player;
        Player beginner = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[2] as Player;

        hound_A.uiPlayerStatusGizmo.SetChatDuration(4f);
        hound_B.uiPlayerStatusGizmo.SetChatDuration(4f);
        beginner.uiPlayerStatusGizmo.SetChatDuration(4f);
        beginner.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_0"));
        yield return((object)new WaitForSeconds(5f));

        hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_1"));
        yield return((object)new WaitForSeconds(10f));

        hound_B.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_2"));
        yield return((object)new WaitForSeconds(4f));

        hound_B.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_3"));
        yield return((object)new WaitForSeconds(6f));

        beginner.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_4"));
        yield return((object)new WaitForSeconds(4f));

        hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_5"));
        yield return((object)new WaitForSeconds(10f));

        hound_B.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_6"));
        yield return((object)new WaitForSeconds(5f));

        hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_7"));
        yield return((object)new WaitForSeconds(4f));

        hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_8"));
        yield return((object)new WaitForSeconds(4f));

        if ((int)enemy.BarrierHp > 1)
        {
            enemy.BarrierHp = 1;
        }
        vorgonBarrierBrokenProc = true;
    }
예제 #4
0
    public static UIBehaviour CreatePrefabUI(Object prefab, GameObject inactive_inctance, Type add_component_type, bool initVisible, Transform parent, int depth, GameSceneTables.SectionData section_data)
    {
        //IL_0059: Unknown result type (might be due to invalid IL or missing references)
        //IL_00a4: Unknown result type (might be due to invalid IL or missing references)
        //IL_00aa: Unknown result type (might be due to invalid IL or missing references)
        //IL_00af: Expected O, but got Unknown
        //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
        if (parent == null && MonoBehaviourSingleton <UIManager> .IsValid())
        {
            parent = MonoBehaviourSingleton <UIManager> .I._transform;
        }
        string text = prefab.get_name();

        if (text.StartsWith("internal__"))
        {
            text = text.Substring(text.LastIndexOf("__") + 2);
        }
        Transform val = Utility.CreateGameObject(text, parent, 5);

        val.get_gameObject().AddComponent <UIPanel>();
        Transform val2 = null;

        val2 = ((!(inactive_inctance != null)) ? ResourceUtility.Realizes(prefab, val, 5) : InstantiateManager.Realizes(ref inactive_inctance, val, 5));
        if (add_component_type == null)
        {
            add_component_type = Type.GetType(val2.get_name());
        }
        UIBehaviour uIBehaviour = (add_component_type == null) ? val.get_gameObject().AddComponent <UIBehaviour>() : (val.get_gameObject().AddComponent(add_component_type) as UIBehaviour);

        uIBehaviour.collectUI   = val2;
        uIBehaviour.sectionData = section_data;
        TestTransitionAnim(val2, section_data);
        if (MonoBehaviourSingleton <UIManager> .I.common != null)
        {
            int    num   = 0;
            string text2 = uIBehaviour.GetCaptionText();
            if (section_data != (GameSceneTables.SectionData)null)
            {
                if (text2 == null)
                {
                    text2 = section_data.GetText("CAPTION");
                }
                num = section_data.backButtonIndex;
            }
            if (num > 0)
            {
                MonoBehaviourSingleton <UIManager> .I.common.AttachBackButton(uIBehaviour, num - 1);
            }
            MonoBehaviourSingleton <UIManager> .I.common.AttachCaption(uIBehaviour, num, text2);
        }
        uIBehaviour.InitUI();
        uIBehaviour.baseDepth = depth;
        if (!initVisible)
        {
            val2.GetComponentsInChildren <UIWidget>(Temporary.uiWidgetList);
            int i = 0;
            for (int count = Temporary.uiWidgetList.Count; i < count; i++)
            {
                Temporary.uiWidgetList[i]._Update();
            }
            Temporary.uiWidgetList.Clear();
        }
        uIBehaviour.uiVisible = initVisible;
        return(uIBehaviour);
    }