|
@@ -137,15 +137,34 @@ public class ShopUI : MonoBehaviour
|
|
|
|
|
|
|
|
public void Refresh()
|
|
public void Refresh()
|
|
|
{
|
|
{
|
|
|
- if(GameManager.instance.money - refreshPrice < 0)
|
|
|
|
|
|
|
+ if(refreshPrice != 0)
|
|
|
{
|
|
{
|
|
|
- return;
|
|
|
|
|
|
|
+ if (GameManager.instance.money - refreshPrice < 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ GameManager.instance.money -= refreshPrice;
|
|
|
|
|
+ refreshNum += 1;
|
|
|
}
|
|
}
|
|
|
- GameManager.instance.money -= refreshPrice;
|
|
|
|
|
- refreshNum += 1;
|
|
|
|
|
Init();
|
|
Init();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public void FreeRefresh()
|
|
|
|
|
+ {
|
|
|
|
|
+ for(int i = 0; i < 5; i++)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (treasuresSaleUI[i].gameObject.activeSelf)
|
|
|
|
|
+ {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(i == 4)
|
|
|
|
|
+ {
|
|
|
|
|
+ refreshPrice = 0;
|
|
|
|
|
+ refreshPriceText.text = $"-{refreshPrice}";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public void DrawUIPolygon()
|
|
public void DrawUIPolygon()
|
|
|
{
|
|
{
|
|
|
GameManager gameManager = GameManager.instance;
|
|
GameManager gameManager = GameManager.instance;
|