public bool BuyStat(MinionBoughtDef.StatNames id) { var currency = _gm.User.Currency; var currLevel = _gm.User.GetMinionBought(_popup.selected).GetStatLevel(id); var statPrice = _storeStatsCurrencyDef[_popup.selected].GetPrice(id, currLevel + 1); if (currency - statPrice < 0) { return(false); } _gm.User.BuyMinionStat(_popup.selected, id, Mathf.CeilToInt(statPrice)); //Call again to refresh data. _popup.SetCurrency(_gm.User.Currency); _popup.UpdateSkillsPanel(); return(true); }
void OnPopupDisplayCallback() { //TODO :: Setear tambien al Runner como seleccionado default (asi muestra la info de este). _popup.SetCurrency(_gm.User.Currency); foreach (var item in _storeInfoData) { _popup.CheckMinionAvailability(item.Key, GetUserTotalStars() < item.Value.starsNeedToUnlock, IsMinionBought(item.Key)); } }