private void ShowInforSupport() { support_Icon.mainTexture = selectedSlot.icon.mainTexture; MyLocalization.ItemInfo itemInfo = GameManager.localization.getItem(selectedSlot.item.ItemId); support_name.text = itemInfo.Name; support_Des.text = itemInfo.Description; }
private void ShowInforItem(int index) { information_icon.mainTexture = items[index].mainTexture; int[] itemList = (from item in itemsRequire select item.Key).ToArray(); MyLocalization.ItemInfo info = GameManager.localization.getItem(itemList[index]); information_name.text = info.Name; information_des.text = info.Description; }
private void ShowInfoResource(int id) { GameItem gameItem = (GameItem)GameManager.GameItems[id]; MyLocalization.ItemInfo itemInfo = GameManager.localization.getItem(id); lblItemInfo.text = string.Format("[{0}]{1}[-]\n" + GameManager.localization.GetText("Global_Level") + "{2}\n" + GameManager.localization.GetText("Global_Type") + " {3}\n[i]{4}[/i]", Helper.ColorToHex(Color.white), gameItem.Name, Helper.GetLevelItem(gameItem.Level), (ItemKind)gameItem.Kind, itemInfo.Description); }
public void ShowItem(ShopItem shopItem, Texture text) { textture.mainTexture = text; lblItemName.text = shopItem.Name; lblType.text = string.Format(GameManager.localization.GetText("Shop_Item_Info_Type"), shopItem.ItemKind.ToString()); lblLevel.text = string.Format(GameManager.localization.GetText("Shop_Item_Info_LevelRequired"), shopItem.UserLevel.ToString()); lblDes.text = ""; Debug.Log("ItemKind " + shopItem.ItemKind); string info = ""; if (shopItem.ItemKind == ItemKind.Ring) { info = GameManager.localization.GetText("Shop_Item_Info_Ring_Stats"); } else if (shopItem.ItemKind == ItemKind.Armor) { info = GameManager.localization.GetText("Shop_Item_Info_Armor_Stats"); } else if (shopItem.ItemKind == ItemKind.Medal) { info = GameManager.localization.GetText("Shop_Item_Info_Medal_Stats"); } else { MyLocalization.ItemInfo item = GameManager.localization.getItem(shopItem.ItemId); info = item.Description; } info = Helper.StringToMultiLine(info); // Debug.Log(info); lblDes.text = info; }
private void InitItem() { support_Icon.mainTexture = Helper.LoadTextureForSupportItem(userItem.ItemId); MyLocalization.ItemInfo itemInfo = GameManager.localization.getItem(userItem.ItemId); if (userItem.GameItem.Kind == (int)ItemKind.Support) { if (heroManager.heroSlotSelected != null) { if (heroManager.heroSlotSelected.userRole != null) { UserRole curRole = heroManager.heroSlotSelected.userRole; if (userItem.RoleUId != curRole.Id) { btnUnEquip.gameObject.SetActive(false); btnUse.gameObject.SetActive(true); } else { btnUnEquip.gameObject.SetActive(true); btnUse.gameObject.SetActive(false); } } } } else { btnUnEquip.gameObject.SetActive(false); btnUse.gameObject.SetActive(true); } string EquipedForRole = ""; if (GameScenes.currentSence == GameScenes.MyScene.Hero || GameScenes.currentSence == GameScenes.MyScene.ItemUpgrade) { if (userItem.RoleUId > 0) { UserRole role = GameManager.GameUser.UserRoles.FirstOrDefault(p => p.Id == userItem.RoleUId); if (role != null) { EquipedForRole = string.Format("[00FF00]({0})[-]", role.Name); } } } string level = ""; if (userItem.GameItem.Kind == (int)ItemKind.Support) { level = string.Format("({0}{1})", GameManager.localization.GetText("Global_Lvl"), Helper.GetLevelItem(userItem.GameItem.Level)); } support_name.text = itemInfo.Name + level + "\n" + EquipedForRole; support_Des.text = itemInfo.Description; if (userItem.GameItem.SubKind == (int)ItemSubKind.Equipment || userItem.GameItem.SubKind == (int)ItemSubKind.HeroUpgrade || userItem.GameItem.SubKind == (int)ItemSubKind.ItemUpgrade) { lblBtnUse.transform.parent.gameObject.SetActive(false); } if (heroManager.heroSlotSelected == null) { btnUnEquip.gameObject.SetActive(false); btnUse.gameObject.SetActive(false); } }