public void Start() { Debug.Log("dataWarehouse 初始化----------------------------------------"); Debug.Log("main為:" + main); DontDestroyOnLoad(this); updateBagItem += none; //主要用於itemInBag更新時觸發對應UI的更新(bagPanel) updateNowRoleItems += none; //主要用於army[index].itemNos更新時觸發對應UI的更新(equipBar) //其實以上withIntList都可以用withNone代替的 updateNowRoleAttr += none; denyNowRoleAttr += none; onPlayerUpdate += none; onArmyUpdate += none; }
public rolePanel panel; //初始化時賦予 public void init(RoleRecord inf, careerInf career, withCareer callback, withNone upgrade_callback) { roleInf = inf; this.career = career; Debug.Log("Icon" + Icon + "race:" + inf.race); Icon.sprite = ImageList.main.headIcons[inf.race]; if (itemName != null) { string name = career.name; itemName.text = name; } if (itemCost != null) { itemCost.text = "" + career.Price; } onClick_callback = callback; onUpgradeFinsh_callback = upgrade_callback; }
public void init(tableData data, withNone callback) { init(data); afterClick += callback; }