public void createStatsDisplay(ItemBuff[] buffs) { foreach (var buff in buffs) { var go = Instantiate(ModTextPrefab, statContainer); EnchantressModButton modButton = go.GetComponent <EnchantressModButton>(); modButton.TextModButton.text = buff.attribute + " : " + buff.value; modButton.buff = buff; } }
//Generate a modifier list when an Item is dropped on enchanteress UI public void GenerateModifierList(InventorySlot2 _slot) { foreach (var buff in _slot.item.buffs) { var go = Instantiate(ModTextPrefab, statContainer); EnchantressModButton modButton = go.GetComponent <EnchantressModButton>(); modButton.TextModButton.text = buff.attribute + " : " + buff.value; modButton.buff = buff; } }