//----------Outfits---------// public void ShowOutfits(GComponent lastPopup, CharGame charGame, SerializablePropertys propertys) { ItemChar itemChar = charGame.DataChar; var pm_choise = new QuickControlList(); for (int i = 0; i < itemChar.ItemByType.Length; i++) { ItemChar.Items items = itemChar.ItemByType[i]; if (items.ItemList != null && items.ItemList.Length > 0) { Item.EItemType eItemType = (Item.EItemType)i; pm_choise.AddBt(Item.StrEItemType[i], (EventContext context) => { this._showOutfits2(charGame, pm_choise.contentPane, eItemType, items, propertys); }); } } pm_choise.AddBt("Cancel", (EventContext context) => { pm_choise.Dispose(); }); pm_choise.SetParent(InputFieldHelper.Instance.PopUp); lastPopup.visible = false; pm_choise.SetOnDispose(() => { lastPopup.visible = true; }); }
void addItem(int key_or_itemCode, bool is_weapon, Item.EItemType item_type, string item_name, int item_count, int ammo_count, int item_cost, int bullet_cost) { items[key_or_itemCode] = (new Item(item_type, item_name, key_or_itemCode, item_count, ammo_count)); itemInfos[key_or_itemCode] = (new ItemInfo(is_weapon, item_cost, bullet_cost)); ItemCode[Dic_Length] = key_or_itemCode; Dic_Length++; }
public void CheckItemBeforeEquip(CharGame charGame, Item.EItemType itemType) { if (itemType == Item.EItemType.hair) { UnEquip(charGame, Item.EItemType.accessories); } else if (itemType == Item.EItemType.accessories) { UnEquip(charGame, Item.EItemType.hair); } }
private void _showOutfits2(CharGame charGame, GComponent lastPopup, Item.EItemType eItemType, ItemChar.Items items, SerializablePropertys propertys) { _controlPropertys_Init(); lastPopup.visible = false; controlPropertys._btClose.onClick.Clear(); controlPropertys._btClose.onClick.Add(() => { _controlPropertys_Dispose(); lastPopup.visible = true; }); controlPropertys.SetTitle(Item.StrEItemType[(int)eItemType]); controlPropertys.ResetListItem(); controlPropertys.ResetSelectItem(); _showOutfits3(charGame, items, propertys); _refreshListOutfits(items); controlPropertys.ShowOn(InputFieldHelper.Instance.PopUp); }
public bool UnEquip(CharGame charGame, Item.EItemType t) { int slot = (int)t; for (int i = 0; i < PropertysChar.Count; i++) { var pCheck = PropertysChar[i]; if (pCheck.EquipSlot == slot) { if (UnEquip(charGame, pCheck) == false) { InputFieldHelper.Instance.ShowNoti("Can't UnEquip which item same slot."); return(true); } } } return(false); }
public ItemView CreateItemView(Item.EItemType type) { ItemView itemView = null; switch(type) { case Item.EItemType.FLOWER: itemView = _flowerFactory.Allocate().GetComponent<ItemView>(); break; case Item.EItemType.COIN: itemView = _coinFactory.Allocate().GetComponent<ItemView>(); break; case Item.EItemType.QUEST_ITEM: itemView = _questItemFactory.Allocate().GetComponent<ItemView>(); break; } return itemView; }
void addDefaultItem(int key_or_itemCode, bool is_weapon, Item.EItemType item_type, string item_name, int item_count, int ammo_count, int item_cost, int bullet_cost) { items[key_or_itemCode] = (new Item(item_type, item_name, key_or_itemCode, item_count, ammo_count)); itemInfos[key_or_itemCode] = (new ItemInfo(is_weapon, item_cost, bullet_cost)); }
void AddItem(Item.EItemType item_type, int item_code, int item_count, int ammo_count, int max_bullet, int bullet_count, string item_name, int item_cost, int ammo_cost) { ItemCode[dicLength++] = item_code; items[item_code] = new Item(item_type, item_code, item_count, ammo_count, max_bullet, bullet_count); itemInfos[item_code] = new ItemInfo(item_name, item_cost, ammo_cost); }
void AddItem(Item.EItemType item_type, int item_code, int item_count, string item_name, int item_cost) { ItemCode[dicLength++] = item_code; items[item_code] = new Item(item_type, item_code, item_count); itemInfos[item_code] = new ItemInfo(item_name, item_cost); }
protected ItemView _CreateItemView(Item.EItemType type) { return(ItemViewFactory.i.CreateItemView(type)); }