public static void GetItemDesButton(GameObject go, int itemDataID, bool isLongPress = true) { ItemDesButton itemDesButton = ItemDesButton.Get(go); ShowDescriptionType type = isLongPress ? ShowDescriptionType.longPress : ShowDescriptionType.click; itemDesButton.SetItemInfo(itemDataID, type); }
public static void GetRoleDesButton(GameObject go, LuaTable roleInfo, bool isPlayer, bool isLongPress = true) { RoleDesButton btn = RoleDesButton.Get(go); ShowDescriptionType type = isLongPress ? ShowDescriptionType.longPress : ShowDescriptionType.click; if (isPlayer) { btn.SetRoleInfo(new PlayerInfo(roleInfo), type); } else { btn.SetRoleInfo(new HeroInfo(roleInfo), type); } }
public void SetDesButtonType(ShowDescriptionType type) { if (_roleInfo != null && GetComponentInChildren <RoleDesButton>() != null) { GetComponentInChildren <RoleDesButton>().SetType(type); } else if (_commonEquipIcon != null && GetComponentInChildren <EquipmentDesButton>() != null) { GetComponentInChildren <EquipmentDesButton>().SetType(type); } else if (_commonItemIcon != null && GetComponentInChildren <ItemDesButton>() != null) { GetComponentInChildren <ItemDesButton>().SetType(type); } }
public static void GetRoleDesButton(GameObject go, int id, int star, bool isShowBase, bool isLongPress = true) { RoleDesButton btn = RoleDesButton.Get(go); ShowDescriptionType type = isLongPress ? ShowDescriptionType.longPress : ShowDescriptionType.click; if (isShowBase) { btn.SetRoleInfo(new GameResData(BaseResType.Hero, id, 0, star), type); } else { if (GameProxy.instance.IsPlayer((uint)id)) { btn.SetRoleInfo(GameProxy.instance.PlayerInfo, type); } else { btn.SetRoleInfo(Logic.Hero.Model.HeroProxy.instance.GetHeroInfo((uint)id), type); } } }
public void SetData(BlackMarketInfo info, bool bigHero = false, ShowDescriptionType clickType = ShowDescriptionType.longPress) { blackMarketInfo = info; if (_commonRewardIcon != null) { GameObject.DestroyObject(_commonRewardIcon.gameObject); } if (_commonHeroIcon != null) { GameObject.DestroyObject(_commonHeroIcon.gameObject); } if (bigHero) { _commonHeroIcon = CommonHeroIcon.View.CommonHeroIcon.CreateBigIcon(transform); _commonHeroIcon.transform.SetAsFirstSibling(); _commonHeroIcon.SetGameResData(info.itemData); RoleDesButton.Get(_commonHeroIcon.gameObject).SetRoleInfo(info.itemData, clickType); } else { _commonRewardIcon = CommonRewardIcon.Create(transform); _commonRewardIcon.transform.SetAsFirstSibling(); _commonRewardIcon.SetGameResData(info.itemData); if (clickType == ShowDescriptionType.longPress) { _commonRewardIcon.onClickHandler = OnClickRewardBtnHandler; } _commonRewardIcon.SetDesButtonType(clickType); } remaindCountText.text = info.remaindCountString; if (maskGameObject != null) { maskGameObject.SetActive(GameProxy.instance.AccountLevel < blackMarketInfo.limitLv); limitLevelText.text = string.Format(Localization.Get("ui.black_market_view.limit_lv"), blackMarketInfo.limitLv); } GetComponent <Image>().enabled = false; }
public void SetType(ShowDescriptionType type) { _type = type; }
public void SetEquipInfo(int equipId, ShowDescriptionType type = ShowDescriptionType.longPress, float showDelay = 0.15f) { EquipmentInfo info = new EquipmentInfo(0, equipId, 0); SetEquipInfo(info, type, showDelay); }
public void SetEquipInfo(EquipmentInfo data, ShowDescriptionType type = ShowDescriptionType.longPress, float showDelay = 0.15f) { _equipInfo = data; _showDelay = showDelay; _type = type; }
public void SetRoleInfo(RoleInfo roleInfo, ShowDescriptionType type = ShowDescriptionType.longPress, float showDelay = 0.15f) { _roleInfo = roleInfo; _showDelay = showDelay; _type = type; }
public void SetRoleInfo(GameResData data, ShowDescriptionType type = ShowDescriptionType.longPress, float showDelay = 0.15f) { HeroInfo info = new HeroInfo(0, data.id, 1, 0, data.star); SetRoleInfo(info, type, showDelay); }
public void SetItemInfo(int itemDataId, ShowDescriptionType type = ShowDescriptionType.longPress, float showDelay = 0.15f) { ItemInfo info = new ItemInfo(0, itemDataId, 0); SetItemInfo(info, type, showDelay); }
public void SetItemInfo(ItemInfo data, ShowDescriptionType type = ShowDescriptionType.longPress, float showDelay = 0.15f) { _itemInfo = data; _showDelay = showDelay; _type = type; }