private int GetPrefabUIDepth(GAME_SECTION_TYPE type)
 {
     if (MonoBehaviourSingleton <GameSceneManager> .I.isOpenImportantDialog)
     {
         return(9999);
     }
     if (type.IsDialog())
     {
         return(5000 + hierarchyList.Count * 10);
     }
     return(1000 + hierarchyList.Count * 10);
 }
示例#2
0
    public void Push(string scene_name, string section_name, GAME_SECTION_TYPE section_type)
    {
        int num = historyList.FindIndex((HistoryData o) => o.sceneName == scene_name && o.sectionName == section_name);

        if (num != -1)
        {
            int num2 = historyList.Count - 1;
            num++;
            if (num <= num2)
            {
                historyList.RemoveRange(num, num2 - num + 1);
            }
        }
        else
        {
            HistoryData historyData = new HistoryData();
            historyData.sceneName   = scene_name;
            historyData.sectionName = section_name;
            historyData.sectionType = section_type;
            historyList.Add(historyData);
        }
    }
    public List <HierarchyData> GetExclusiveList(GAME_SECTION_TYPE type)
    {
        List <HierarchyData> list = new List <HierarchyData>();
        int num = (!type.IsSingle()) ? hierarchyList.FindLastIndex((HierarchyData o) => o.data.type == type) : hierarchyList.FindLastIndex((HierarchyData o) => o.data.type.IsSingle());

        if (num == -1)
        {
            if (type == GAME_SECTION_TYPE.SCREEN)
            {
                int num2 = hierarchyList.Count - 1;
                while (num2 >= 0 && hierarchyList[num2].data.type != 0)
                {
                    list.Add(hierarchyList[num2]);
                    num2--;
                }
            }
            else
            {
                int num3 = hierarchyList.Count - 1;
                while (num3 >= 0 && hierarchyList[num3].data.type.IsSingle())
                {
                    list.Add(hierarchyList[num3]);
                    num3--;
                }
            }
            return(list);
        }
        if (type == GAME_SECTION_TYPE.DIALOG)
        {
            num++;
        }
        for (int num4 = hierarchyList.Count - 1; num4 >= num; num4--)
        {
            list.Add(hierarchyList[num4]);
        }
        return(list);
    }
 public HierarchyData GetTyped(GAME_SECTION_TYPE type)
 {
     return(typedDatas[(int)type]);
 }
示例#5
0
 public static bool IsSingle(this GAME_SECTION_TYPE type)
 {
     return(type == GAME_SECTION_TYPE.SINGLE_DIALOG || type == GAME_SECTION_TYPE.COMMON_DIALOG);
 }
示例#6
0
 public static bool IsDialog(this GAME_SECTION_TYPE type)
 {
     return(type == GAME_SECTION_TYPE.DIALOG || type == GAME_SECTION_TYPE.PAGE_DIALOG || type == GAME_SECTION_TYPE.SINGLE_DIALOG || type == GAME_SECTION_TYPE.COMMON_DIALOG);
 }