コード例 #1
0
 public void ShowItems(int itemCount)
 {
     canUseItemList = ItemListTool.GetCanUseItemList(AttributeList.gameObject, "Attribute");
     for (int i = 0; i < itemCount; i++)
     {
         GameObject go = ItemListTool.GetNewItemObj(canUseItemList, AttributeList.gameObject, Attribute0.gameObject);
         go.transform.name = "Attribute" + i.ToString();
         go.GetComponent <UILabel>().text = properTitelList[i] + ":" + propertyValueList[i];
     }
     AttributeList.Reposition();
     ItemListTool.ActiveUnuseItem(canUseItemList);
 }
コード例 #2
0
 public void ShowPropertys(int propertyCount)
 {
     attributeList.Clear();
     canUsePropertyList = ItemListTool.GetCanUseItemList(AttributeList.gameObject, "Attribute");
     for (i = 0; i < propertyCount; i++)
     {
         GameObject go = ItemListTool.GetNewItemObj(canUsePropertyList, AttributeList.gameObject, Attribute0.gameObject);
         go.transform.name = "Attribute" + i.ToString();
         EquipAttribute attriView;
         if (go.GetComponent <EquipAttribute>() == null)
         {
             attriView = go.AddComponent <EquipAttribute>();
         }
         else
         {
             attriView = go.GetComponent <EquipAttribute>();
         }
         attriView.Init();
         attributeList.Add(attriView);
     }
     AttributeList.Reposition();
     ItemListTool.ActiveUnuseItem(canUsePropertyList);
 }