Exemple #1
0
    private void SetScrollView(bool isRefresh)
    {
        List <Item>       itemList   = new List <Item>(ItemManager.Instance.GetItemListByType(_managerType, ItemData.TypeEnum.Equip));
        List <TeamMember> memberList = TeamManager.Instance.GetAttendList();

        for (int i = memberList.Count - 1; i >= 0; i--)
        {
            if (memberList[i].Armor.ID != 0)
            {
                itemList.Insert(0, memberList[i].Armor);
            }
            if (memberList[i].Weapon.ID != 0)
            {
                itemList.Insert(0, memberList[i].Weapon);
            }
        }

        if (isRefresh)
        {
            ScrollView.Refresh(new ArrayList(itemList));
        }
        else
        {
            ScrollView.SetData(new ArrayList(itemList));
        }
    }
Exemple #2
0
    private void SetScrollView(ItemData.TypeEnum type, bool isRefresh)
    {
        ItemData.RootObject data;
        List <Item>         itemList             = ItemManager.Instance.GetItemListByType(ItemManager.Type.Warehouse, type);
        List <KeyValuePair <Item, int> > sellDic = new List <KeyValuePair <Item, int> >(); //Item, price

        for (int i = 0; i < itemList.Count; i++)
        {
            if (itemList[i].ID == 0)
            {
                itemList.RemoveAt(i); //移除緊急逃脫裝置,那是非賣品
                i--;
            }
        }

        foreach (Item item in itemList)
        {
            data = ItemData.GetData(item.ID);
            sellDic.Add(new KeyValuePair <Item, int> (item, data.Price / 2));
        }

        if (isRefresh)
        {
            ScrollView.Refresh(new ArrayList(sellDic));
        }
        else
        {
            ScrollView.SetData(new ArrayList(sellDic));
        }
    }
Exemple #3
0
    private void SetScrollView(bool isRefresh)
    {
        List <Item> itemList = ItemManager.Instance.GetCanCookList(_managerType);

        if (isRefresh)
        {
            ScrollView.Refresh(new ArrayList(itemList));
        }
        else
        {
            ScrollView.SetData(new ArrayList(itemList));
        }
    }
Exemple #4
0
    private void SetScrollView(ItemData.TypeEnum type, bool isRefresh)
    {
        List <Item> itemList = new List <Item>();

        itemList = ItemManager.Instance.GetItemListByType(_managerType, type);

        if (type == ItemData.TypeEnum.Equip)
        {
            for (int i = 0; i < itemList.Count; i++)
            {
                Debug.Log(((Equip)itemList[i]).EquipType);
            }
        }

        if (isRefresh)
        {
            ScrollView.Refresh(new ArrayList(itemList));
        }
        else
        {
            ScrollView.SetData(new ArrayList(itemList));
        }
    }
Exemple #5
0
 private void Refresh()
 {
     WarehouseScrollView.Refresh(new ArrayList(ItemManager.Instance.GetItemListByType(ItemManager.Type.Warehouse, ItemData.TypeEnum.All)));
     BagScrollView.Refresh(new ArrayList(ItemManager.Instance.GetItemListByType(ItemManager.Type.Bag, ItemData.TypeEnum.All)));
 }
 private void ButtonOnClick(object obj)
 {
     NumberList.Remove((string)obj);
     ScrollView.Refresh(new ArrayList(NumberList));
 }