SetData() public method

public SetData ( object data ) : void
data object
return void
Example #1
0
    public void Init(TeamMember member, bool isSpellCard)
    {
        Clear();

        _member      = member;
        _isSpellCard = isSpellCard;

        if (isSpellCard)
        {
            SkillScrollView.SetData(new ArrayList(member.SpellCardDic));
        }
        else
        {
            SkillScrollView.SetData(new ArrayList(member.SkillDic));
        }

        if (MySceneManager.Instance.CurrentScene == MySceneManager.SceneType.Villiage)
        {
            _itemManagerType = ItemManager.Type.Warehouse;
        }
        else
        {
            _itemManagerType = ItemManager.Type.Bag;
        }
    }
Example #2
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));
        }
    }
Example #3
0
 static int QPYX_SetData_YXQP(IntPtr L_YXQP)
 {
     try
     {
         int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP);
         if (QPYX_count_YXQP == 2)
         {
             LoopScrollView QPYX_obj_YXQP  = (LoopScrollView)ToLua.CheckObject <LoopScrollView>(L_YXQP, 1);
             object         QPYX_arg0_YXQP = ToLua.ToVarObject(L_YXQP, 2);
             QPYX_obj_YXQP.SetData(QPYX_arg0_YXQP);
             return(0);
         }
         else if (QPYX_count_YXQP == 3)
         {
             LoopScrollView QPYX_obj_YXQP  = (LoopScrollView)ToLua.CheckObject <LoopScrollView>(L_YXQP, 1);
             object         QPYX_arg0_YXQP = ToLua.ToVarObject(L_YXQP, 2);
             int            QPYX_arg1_YXQP = (int)LuaDLL.luaL_checknumber(L_YXQP, 3);
             QPYX_obj_YXQP.SetData(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
             return(0);
         }
         else
         {
             return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: LoopScrollView.SetData"));
         }
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Example #4
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));
        }
    }
    static int SetData(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                LoopScrollView obj  = (LoopScrollView)ToLua.CheckObject <LoopScrollView>(L, 1);
                object         arg0 = ToLua.ToVarObject(L, 2);
                obj.SetData(arg0);
                return(0);
            }
            else if (count == 3)
            {
                LoopScrollView obj  = (LoopScrollView)ToLua.CheckObject <LoopScrollView>(L, 1);
                object         arg0 = ToLua.ToVarObject(L, 2);
                int            arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
                obj.SetData(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LoopScrollView.SetData"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 // Start is called before the first frame update
 void Start()
 {
     for (int i = 0; i < 20; i++)
     {
         NumberList.Add(i.ToString());
     }
     ScrollView.SetData(new ArrayList(NumberList));
     ScrollView.AddClickHandler(ButtonOnClick);
 }
Example #7
0
    private void SetItemGroup(List <int> itemList)
    {
        List <KeyValuePair <int, int> > itemPair = new List <KeyValuePair <int, int> >();

        for (int i = 0; i < itemList.Count; i++)
        {
            itemPair.Add(new KeyValuePair <int, int>(itemList[i], 1));
        }
        ScrollView.SetData(new ArrayList(itemPair));
    }
Example #8
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));
        }
    }
Example #9
0
    void Start()
    {
        for (int i = 0; i < 99; i++)
        {
            testList.Add(i);
        }

        LoopScrollView loopScrollView = GetComponent <LoopScrollView>();

        loopScrollView.SetData(testList);
        loopScrollView.OnItemClick = OnItemClick;
        loopScrollView.MoveToIndex(72);
    }
Example #10
0
    private void SetScrollView(ShopData.TypeEnum type)
    {
        ItemData.RootObject   data;
        List <int>            idList  = ShopData.GetIDList(type);
        Dictionary <int, int> itemDic = new Dictionary <int, int>(); //id, price

        for (int i = 0; i < idList.Count; i++)
        {
            data = ItemData.GetData(idList[i]);
            itemDic.Add(data.ID, data.Price);
        }
        ScrollView.SetData(new ArrayList(itemDic));
    }
Example #11
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));
        }
    }
 private void MapOnClick(object obj)
 {
     if (obj != null)
     {
         DungeonGroupData.RootObject   group     = (DungeonGroupData.RootObject)obj;
         List <DungeonData.RootObject> floorList = DungeonData.GetFloorList(group.ID, ExploreController.Instance.ArriveFloor);
         FloorScrollView.SetData(new ArrayList(floorList));
         FloorScrollView.gameObject.SetActive(true);
         //GroupScrollView.gameObject.SetActive(false);
         MapGroup.SetActive(false);
         GroupLabel.text = group.Name;
     }
     else
     {
         ConfirmUI.Open("敬請期待!", "確定", null);
     }
 }
Example #13
0
 private void SetData()
 {
     WarehouseScrollView.SetData(new ArrayList(ItemManager.Instance.GetItemListByType(ItemManager.Type.Warehouse, ItemData.TypeEnum.All)));
     BagScrollView.SetData(new ArrayList(ItemManager.Instance.GetItemListByType(ItemManager.Type.Bag, ItemData.TypeEnum.All)));
 }
Example #14
0
 private void SetSkillScrollViewData(List <Skill> list)
 {
     SkillScrollView.SetData(new ArrayList(list));
 }
Example #15
0
 public void Open(List <BattleStatus> statusList)
 {
     gameObject.SetActive(true);
     ScrollView.SetData(new ArrayList(statusList));
 }