/// <summary> /// 选中一个技能 /// </summary> /// <param name="_itemUI"></param> void OnSelectSkillUI(GuildShopItemUI _itemUI) { //selectSkillUI = _itemUI; //if (OnSelectItemEvent != null) // { // OnSelectItemEvent(selectSkillUI); //} }
/// <summary> /// 刷新表现 /// </summary> public void RefreshItems() { Object guildShopItemprefab = null; if (guildShopItemprefab == null) { guildShopItemprefab = exResources.GetResource(ResourceType.GUI, "Guild/GuildShopItem"); } if (guildShopItemprefab == null) { GameSys.LogError("找不到预制:Guild/GuildShopItem"); return; } Vector3 V3 = Vector3.zero; for (int i = 0; i < guildShopItemList.Count; i++) { if (!GuildShopItemContainers.ContainsKey(i)) { GameObject obj = Instantiate(guildShopItemprefab) as GameObject; Transform parentTransf = this.gameObject.transform; obj.transform.parent = parentTransf; obj.transform.localPosition = V3; obj.transform.localScale = Vector3.one; if ((i + 1) % 2 == 0) { V3 = new Vector3(0, V3.y - 100, V3.z); } else { V3 = new Vector3(V3.x + 210, V3.y, V3.z); } GuildShopItemUI shopItemUI = obj.GetComponent <GuildShopItemUI>(); shopItemUI.FillInfo(guildShopItemList[i]); GuildShopItemContainers[i] = shopItemUI; } } guildShopItemprefab = null; }