UI换了很多,spine主视觉停用
This commit is contained in:
@@ -655,7 +655,7 @@ public class storeSystem : MonoBehaviour
|
||||
&& itemSO.canbepurchased
|
||||
&& !IsAssociatedContentUnlocked(itemSO)
|
||||
&& !IsSoldOut(itemSO)
|
||||
&& HasSupportedRequirement(itemSO);
|
||||
&& HasValidPurchaseCost(itemSO);
|
||||
}
|
||||
|
||||
private void SpawnItem(storeItemSO itemSO)
|
||||
@@ -988,14 +988,15 @@ public class storeSystem : MonoBehaviour
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool HasSupportedRequirement(storeItemSO itemSO)
|
||||
private bool HasValidPurchaseCost(storeItemSO itemSO)
|
||||
{
|
||||
if (itemSO == null || itemSO.costRequirements == null || itemSO.costRequirements.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return GetCurrencySprite(itemSO.costRequirements[0].currencyType) != null;
|
||||
return itemSO.costRequirements[0].currencyType == storeItemSO.CurrencyType.coins
|
||||
|| itemSO.costRequirements[0].currencyType == storeItemSO.CurrencyType.material;
|
||||
}
|
||||
|
||||
private void SetPriceImageState(Image priceImage, Sprite sprite, bool shouldShow)
|
||||
@@ -1297,7 +1298,7 @@ public class storeSystem : MonoBehaviour
|
||||
|
||||
private string GetPriceAmountText(storeItemSO itemSO)
|
||||
{
|
||||
if (itemSO == null || !itemSO.canbepurchased || IsAssociatedContentUnlocked(itemSO) || !HasSupportedRequirement(itemSO))
|
||||
if (itemSO == null || !itemSO.canbepurchased || IsAssociatedContentUnlocked(itemSO) || !HasValidPurchaseCost(itemSO))
|
||||
{
|
||||
return "不可购买";
|
||||
}
|
||||
@@ -1307,7 +1308,11 @@ public class storeSystem : MonoBehaviour
|
||||
|
||||
private bool ShouldShowPriceIcon(storeItemSO itemSO)
|
||||
{
|
||||
return itemSO != null && itemSO.canbepurchased && !IsAssociatedContentUnlocked(itemSO) && HasSupportedRequirement(itemSO);
|
||||
return itemSO != null
|
||||
&& itemSO.canbepurchased
|
||||
&& !IsAssociatedContentUnlocked(itemSO)
|
||||
&& HasValidPurchaseCost(itemSO)
|
||||
&& GetCurrencySprite(itemSO.costRequirements[0].currencyType) != null;
|
||||
}
|
||||
|
||||
private bool CanPurchaseCurrentSelection(storeItemSO itemSO)
|
||||
|
||||
Reference in New Issue
Block a user