public void Init(Equip equip) { m_ToggleFull.value = equip.EnchantLevel >= 5; if (m_ToggleFull.value == true) { m_SpriteFull.SetSpriteActive(equip.AvailableUpgrade()); } else { for (int i = 0; i < 3 && i < equip.Stuffs.Count; ++i) { m_ToggleStuff[i].SetSpriteActive(equip.Stuffs[i].Count > 0); } } }
public void OnUpgrade() { if (m_Equip.AvailableUpgrade() == false) { Tooltip.Instance.ShowMessageKey("NotAvailableEquipUpgrade"); return; } if (Network.PlayerInfo.GetGoodsValue(pe_GoodsType.token_gold) < m_Equip.EnchantCost) { Popup.Instance.Show(ePopupMode.MoveStore, pe_GoodsType.token_gold); return; } OnEquipUpgrade(m_Equip); parent.Close(); }
void Upgrade() { if (m_Equip.AvailableUpgrade() == false) { //Tooltip.Instance.ShowMessageKey("NotAvailableEquipUpgrade"); Popup.Instance.Show(ePopupMode.StuffConfirm, m_Equip.Stuffs[0], "NotAvailableEquipUpgrade"); return; } if (Network.PlayerInfo.GetGoodsValue(pe_GoodsType.token_gold) < m_Equip.EnchantCost) { Popup.Instance.Show(ePopupMode.MoveStore, pe_GoodsType.token_gold); return; } if (m_Equip.Info.NextEquipLevel == short.MaxValue) { Tooltip.Instance.ShowMessageKey("EquipUpgradeLimit"); return; } OnEquipUpgradeCallback(); //Popup.Instance.Show(ePopupMode.EquipUpgrade, equip, new OnEquipUpgradeDelegate(OnEquipUpgradeCallback)); }