public void GetForgeItemFromSlot(GameItem item, Sprite outer, Sprite inner, Color color) { forgeItem = item; // Check affordable var isAffordable = CurrencyManager.instance.CheckGoldAffordable(item.GetForgeCostByForgeLevel()); b_ForgeIt.interactable = isAffordable; i_Outer.sprite = outer; i_Inner.sprite = inner; i_ItemSprite.sprite = item.sprite; t_Name.text = item.GetNameByForgeLevel(); t_Name.color = color; t_CurrentPrice.text = item.GetCurrentPriceByForgeLevel().ToString(); t_NextPrice.text = item.GetNextPriceByForgeLevel().ToString(); // Set forge cost var forgePriceStb = new StringBuilder("-"); forgePriceStb.Append(item.GetForgeCostByForgeLevel()); t_ForgePrice.text = forgePriceStb.ToString(); // Set interval price var intervalPriceStb = new StringBuilder("(+"); intervalPriceStb.Append((item.GetNextPriceByForgeLevel() - item.GetCurrentPriceByForgeLevel())); intervalPriceStb.Append(")"); t_IntervalPrice.text = intervalPriceStb.ToString(); // Set probabality var forgeProbStb = new StringBuilder(ForgeCalculator.GetProbability(item.forgeLevel).ToString()); forgeProbStb.Append("%"); t_ForgeProbability.text = forgeProbStb.ToString(); }
public int GetCurrentPriceByForgeLevel() { return(ForgeCalculator.GetCurrentPrice(forgeLevel, sellingCost)); }
public int GetForgeProbabilityByForgeLevel() { return(ForgeCalculator.GetProbability(forgeLevel)); }
public int GetForgeCostByForgeLevel() { return(ForgeCalculator.GetCost(forgeLevel, GetCurrentPriceByForgeLevel())); }