void OnLearn() { WindowMng.windowMng.PopView(); var pt = backpackData.itemData.propsConfig.propsType; if (pt == (int)ItemData.UnitTypeEnum.SKILL_BOOK) { GameInterface_Backpack.LearnSkillBook(backpackData.id); } else if (pt == (int)ItemData.UnitTypeEnum.FORGE_GRAPH) { GameInterface_Forge.LearnForgeSkill(backpackData.id); } }
public void SetForgeItem(ForgeConfigData data) { fd = data; var canForge = GameInterface_Forge.CanForge(data.id); var s = ""; if (canForge) { s = string.Format("[ff9500]{0}.{1}[-]\n[0affa0]可以打造[-]", data.id, Util.GetItemData((int)GoodsTypeEnum.Equip, data.output).ItemName); } else { s = string.Format("[ff9500]{0}.{1}[-]\n[ff0a0a]材料不足[-]", data.id, Util.GetItemData((int)GoodsTypeEnum.Equip, data.output).ItemName); } GetLabel("Name").text = s; }
void UpdateFrame() { foreach (var c in Cells) { GameObject.Destroy(c); } Cell.SetActive(false); var eq = GameInterface_Forge.GetForgeList(); for (int i = 0; i < eq.Count; i++) { var item = eq[i]; var c = GameObject.Instantiate(Cell) as GameObject; c.transform.parent = Cell.transform.parent; Util.InitGameObject(c); c.SetActive(true); var pak = c.GetComponent <ForgeItem>(); pak.SetForgeItem(item); Cells.Add(c); } Grid.repositionNow = true; }
void OnForge() { WindowMng.windowMng.PopView(); GameInterface_Forge.Forge(forgeData.id); }