// 충전소 셋팅 public void SetChargeShopTap(ShopHelper.ChargeType type, EGoodsType goGoods = EGoodsType.None) { if (nowType == type) { return; } for (int i = 0; i < _btnTaps.Length; i++) { _btnTaps[i].Set(false); } nowType = type; _btnTaps[(int)nowType].Set(true); // 업데이트 SetCharageShop(); UpdateMyGoods(); SetSelectItem(goGoods); // 문구 string warningKey = "UI_LABEL_SHOP_LIST_BUY_WARNING"; if (nowType == ShopHelper.ChargeType.RealCash) { warningKey = "UI_LABEL_SHOP_LIST_BUY_REALCASH_WARNING"; } _labelWarning.text = Localization.Get(warningKey); }
public static void SetGoodsName(this GTextField textField, EGoodsType type, int id) { switch (type) { case EGoodsType.DaoJu: { var deploy = GoodsDeploy.GetInfo(id); textField.text = deploy.Name; break; } case EGoodsType.XinFa: { var deploy = XinFaDeploy.GetInfo(id); textField.text = deploy.Name; break; } case EGoodsType.CanBen: { var deploy = CanBenDeploy.GetInfo(id); textField.text = deploy.Name; break; } default: textField.text = ""; break; } }
// 슬롯셋팅 void SetCharageShopSlot(List <DataShop> _listShop) { int addCount = 0; itemListType = GetItemListType(nowType); for (int i = 0; i < _listShop.Count; i++) { if (itemListType == ItemListType.Ticket) { EGoodsType goods = (EGoodsType)_listShop[i].GetGOODS_TYPE(); if (ItemHelper.IsOpenGoods(goods) == false) // 오픈상품 체크 { continue; } } addCount++; GameObject slot = _itemList[(int)itemListType].AddItem(i.ToString()); UIBaseShopItem item = slot.GetComponent <UIBaseShopItem>(); item.SettingShopItem(_listShop[i]); chargeItemList.Add(item); } _itemList[(int)itemListType].OnReposition(); _stateItemList.SetActive(itemListType.ToString()); _labelEmpty.cachedGameObject.SetActive(addCount <= 0); }
public void RemoveItem(int itemId, EGoodsType type, int count) { int key = (int)type * TypeScope + itemId; ItemData itemInfo; if (GoodsMap.TryGetValue(key, out itemInfo)) { itemInfo.Count -= count; if (itemInfo.Count <= 0) { GoodsMap.Remove(key); } } }
// 보상 리스트 가져오기 List <RewardInfo> GetAttendRewardList(DataGuildReward data) { List <RewardInfo> rewardList = new List <RewardInfo>(); for (int i = 0; i < data.GetREWARD_TYPECount(); i++) { EGoodsType goods = (EGoodsType)data.GetREWARD_TYPE(i); if (goods != EGoodsType.None) { string rewardValue = data.GetREWARD_VALUE(i); RewardInfo reward = new RewardInfo(goods, rewardValue); rewardList.Add(reward); } } return(rewardList); }
public ItemData[] GetGoodsByType(EGoodsType type) { int minKey = (int)type * TypeScope; int maxKey = minKey + TypeScope - 1; List <ItemData> list = new List <ItemData>(); foreach (var data in GoodsMap) { if (data.Key >= minKey && data.Key <= maxKey) { list.Add(data.Value); } } return(list.ToArray()); }
// 선택셋팅(티켓만) void SetSelectItem(EGoodsType type) { if (type == EGoodsType.None || itemListType == ItemListType.Normal) { return; } int selectCount = 0; for (int i = 0; i < chargeItemList.Count; i++) { if (chargeItemList[i].SetSelected(type)) { selectCount = i; } } _itemList[(int)itemListType].MoveIndex(selectCount); }
public static string GetGoodsUrl(EGoodsType type, int id) { switch (type) { case EGoodsType.DaoJu: return(UIPackage.GetItemURL("Common", "IconGoods_" + id)); case EGoodsType.XinFa: return(UIPackage.GetItemURL("Common", "IconXinFa_" + id)); case EGoodsType.CanBen: return(UIPackage.GetItemURL("Common", "IconZhaoShi_" + id)); case EGoodsType.WuXue: var info = UniqueSkillProxy.instance.GetData(id); return(UIPackage.GetItemURL("Common", "IconUniqueSkillBook_" + info.SkillEffectId)); case EGoodsType.HuoBi: return(UIPackage.GetItemURL("Common", "IconHuoBi_" + id)); } return(""); }
public static String GetName(EGoodsType WarenTyp) { return null; }
public CGoodsInfo(EGoodsType WarenTyp) { }
public static string GetGoodsTypeName(EGoodsType type) { return(GoodsTypeNames[(int)type]); }
public static CHtmlImage GetImage(EGoodsType WarenTyp) { return null; }
public void JettisonGoods(Integer Menge, EGoodsType WarenTyp) { }
public ItemData AddItem(int itemId, EGoodsType type, int count) { int key = (int)type * TypeScope + itemId; ItemData itemInfo; if (GoodsMap.TryGetValue(key, out itemInfo)) { itemInfo.Count += count; } else { itemInfo = new ItemData(); itemInfo.Id = itemId; itemInfo.Type = type; itemInfo.Count = count; switch (type) { case EGoodsType.DaoJu: { var deploy = GoodsDeploy.GetInfo(itemId); itemInfo.Name = deploy.Name; itemInfo.Value = deploy.Value; itemInfo.Desc = deploy.Desc; itemInfo.Quality = deploy.Quality; break; } case EGoodsType.XinFa: { var deploy = XinFaDeploy.GetInfo(itemId); itemInfo.Name = deploy.Name; itemInfo.Value = deploy.Value; itemInfo.Desc = deploy.Desc; itemInfo.Quality = deploy.Quality; break; } case EGoodsType.CanBen: { var deploy = CanBenDeploy.GetInfo(itemId); itemInfo.Name = deploy.Name; itemInfo.Value = deploy.Value; itemInfo.Desc = deploy.Desc; itemInfo.Quality = deploy.Quality; break; } case EGoodsType.WuXue: { var data = UniqueSkillProxy.instance.GetData(itemId); itemInfo.Name = data.Name; itemInfo.Value = data.Value; itemInfo.Desc = data.Desc; itemInfo.Quality = data.Quality; break; } default: { itemInfo.Name = ""; itemInfo.Value = 0; itemInfo.Desc = ""; itemInfo.Quality = EGoodsQuality.None; break; } } GoodsMap.Add(key, itemInfo); } return(itemInfo); }
public Integer GetBalance(EGoodsType Type) { return null; }
public override void OnUpdateData(params object[] d) { GoodsType = (EGoodsType)d[0]; }
public Integer SetBeamProtection(EGoodsType Type, Integer Value) { return null; }
public Integer GetBeamProtection(EGoodsType Type) { return null; }
public Integer AmountNormal(EGoodsType WarenTyp) { return null; }
public Integer FreeStorage(EGoodsType WarenTyp) { return null; }
public Integer AmountSpecial(EGoodsType WarenTyp) { return null; }