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