视频改为5次配方
This commit is contained in:
parent
8bdb2cb90e
commit
40395bd895
|
@ -73,7 +73,7 @@ public class ShopItemView : MonoBehaviour
|
|||
{
|
||||
shopData.price = 1;
|
||||
|
||||
videoButton.gameObject.SetActive(CryptoPrefs.GetInt("ShowStrawBerryDialog", 0) == 0);
|
||||
videoButton.gameObject.SetActive(CryptoPrefs.GetInt("ShowStrawBerryDialog", 0) <= 4);
|
||||
|
||||
}
|
||||
if (shopData.id == 13)
|
||||
|
@ -113,6 +113,10 @@ public class ShopItemView : MonoBehaviour
|
|||
{
|
||||
progressText.text = string.Format(ProgressFormat, "1", "1");
|
||||
|
||||
if (shopData.id == 15)
|
||||
{
|
||||
progressText.text = string.Format(ProgressFormat, "5", "5");
|
||||
}
|
||||
progressBar.value = Mathf.InverseLerp(0, shopData.price, 1);
|
||||
videoButton.gameObject.SetActive(false);
|
||||
onObject.SetActive(false);
|
||||
|
@ -130,9 +134,9 @@ public class ShopItemView : MonoBehaviour
|
|||
}
|
||||
else if(shopData.id == 15 )
|
||||
{
|
||||
progressText.text = string.Format(ProgressFormat, CryptoPrefs.GetInt("ShowStrawBerryDialog", 0), "1");
|
||||
progressText.text = string.Format(ProgressFormat, CryptoPrefs.GetInt("ShowStrawBerryDialog", 0), "5");
|
||||
|
||||
progressBar.value = Mathf.InverseLerp(0, shopData.price, CryptoPrefs.GetInt("ShowStrawBerryDialog", 0));
|
||||
progressBar.value = Mathf.InverseLerp(0, 5, CryptoPrefs.GetInt("ShowStrawBerryDialog", 0));
|
||||
onObject.SetActive(false);
|
||||
offObject.SetActive(false);
|
||||
soldOutObject.SetActive(true);
|
||||
|
|
|
@ -193,18 +193,23 @@ public class Shopping : MonoBehaviour
|
|||
else
|
||||
{
|
||||
GetRewardDialog.ShowStrawBerryDialog(() =>
|
||||
{
|
||||
CryptoPrefs.SetInt("ShowStrawBerryDialog", CryptoPrefs.GetInt("ShowStrawBerryDialog", 0)+1);
|
||||
if (CryptoPrefs.GetInt("ShowStrawBerryDialog", 0) == 5)
|
||||
{
|
||||
ShopItemExchangeView.ShowDialog(shopData, () =>
|
||||
{
|
||||
var globalGameData = GameDataManager.GameData;
|
||||
CryptoPrefs.SetInt("ShowStrawBerryDialog", 1);
|
||||
|
||||
// アイテムを増やす
|
||||
AddItem(shopData, 1,globalGameData.CurrentCityId);
|
||||
itemView.SetStockCount(GetItemAmount(shopData));
|
||||
GameDataManager.SaveGameData();
|
||||
recipeNotifyIcon.SetActive(CheckEarnedRecipe());
|
||||
listView.RefreshItemviews();
|
||||
|
||||
});
|
||||
}
|
||||
listView.RefreshItemviews();
|
||||
});
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue