예제 #1
0
    private void SetUpField(ItemToFieldTable.ItemDetailToFieldData _field_data)
    {
        Transform transform = GetTransform();

        SetActive(transform, UI.OBJ_FIELD_ICON, true);
        SetActive(transform, UI.TEX_FIELD_SUB, false);
        SetLabelText(transform, UI.LBL_FIELD_NAME, _field_data.mapData.mapName);
        SetActive(transform, UI.LBL_FIELD_NAME, true);
        UITexture component = FindCtrl(transform, UI.TEX_FIELD).GetComponent <UITexture>();

        ResourceLoad.LoadFieldIconTexture(component, _field_data.mapData);
        SetActive(transform, UI.TEX_FIELD, true);
    }
예제 #2
0
    protected void UpdateTable()
    {
        FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(mapData.mapId);

        string mapName = fieldMapData.mapName;

        SetLabelText((Enum)UI.LBL_MAP_NAME, mapName);
        SetLabelText((Enum)UI.LBL_MAP_NAME_D, mapName);
        UITexture component = GetCtrl(UI.TEX_FIELD).GetComponent <UITexture>();

        ResourceLoad.LoadFieldIconTexture(component, fieldMapData);
        Dictionary <int, string> borderIndexTitleDic = new Dictionary <int, string>(3);
        int count  = deliveryDataAndUIdList.Count;
        int count2 = enemyDataList.Count;
        int count3 = happenDataList.Count;
        int num    = 0;

        if (count >= 1)
        {
            borderIndexTitleDic[0] = StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 0u);
            num++;
        }
        int deliveryStartIndex = num;

        if (count3 >= 1)
        {
            borderIndexTitleDic[count + deliveryStartIndex] = StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 1u);
            num++;
        }
        int happenStartIndex = count + num;

        if (count2 >= 1)
        {
            borderIndexTitleDic[happenStartIndex + count3] = StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 2u);
            num++;
        }
        int enemyStartIndex = count + count3 + num;

        ClearTable();
        int num2 = count + count3 + count2 + num;

        SetActive((Enum)UI.LBL_NON_LIST, num2 <= 0);
        SetTable(UI.TBL_ALL, string.Empty, num2, true, delegate(int i, Transform parent)
        {
            Transform result = null;
            if (borderIndexTitleDic.ContainsKey(i))
            {
                return(Realizes("RegionMapDescriptionBorderItem", parent, true));
            }
            if (i >= enemyStartIndex)
            {
                return(Realizes("RegionMapDescriptionEnemyItem", parent, true));
            }
            if (i >= happenStartIndex)
            {
                return(Realizes("RegionMapDescriptionHappenItem", parent, true));
            }
            if (i >= deliveryStartIndex)
            {
                return(Realizes("RegionMapDescriptionDeliveryItem", parent, true));
            }
            return(result);
        }, delegate(int i, Transform t, bool is_recycle)
        {
            string value = string.Empty;
            if (borderIndexTitleDic.TryGetValue(i, out value))
            {
                SetLabelText(t, UI.LBL_BORDER_TITLE, value);
                SetActive(t, true);
            }
            else if (i >= enemyStartIndex && i - enemyStartIndex < enemyDataList.Count)
            {
                SetupEnemyListItem(t, enemyDataList[i - enemyStartIndex]);
                SetActive(t, true);
            }
            else if (i >= happenStartIndex && i - happenStartIndex < happenDataList.Count)
            {
                SetupHappenListItem(t, happenDataList[i - happenStartIndex]);
                SetActive(t, true);
            }
            else if (i >= deliveryStartIndex && i - deliveryStartIndex < deliveryDataAndUIdList.Count)
            {
                SetupDeliveryListItem(t, deliveryDataAndUIdList[i - deliveryStartIndex]);
                SetActive(t, true);
            }
            else
            {
                SetActive(t, true);
            }
        });
    }