レベルアップ演出時にヘッダーのレベルも上がるように修正
This commit is contained in:
parent
91c61bd79f
commit
d4ea31016e
|
|
@ -36,18 +36,19 @@ public class ShopLevelUp : MonoBehaviour
|
|||
achievementText.text = shopLevelList.FirstOrDefault(data => data.shopLevel == shopLevel)?.Achievement ?? "";
|
||||
recipeNameText.text = productData?.Name ?? "";
|
||||
|
||||
GameDataManager.GameData.ViewedShopLevel = shopLevel;
|
||||
GameDataManager.GameData.OrderConditionCount = 0;
|
||||
// レシピ開放
|
||||
if (productData != null)
|
||||
{
|
||||
GameDataManager.GameData.MyRecipes = new List<int>(GameDataManager.GameData.MyRecipes){productData.id}.Distinct().ToArray();
|
||||
GameDataManager.GameData.DailyRecipeGetCount++;
|
||||
}
|
||||
GameDataManager.SaveGameData();
|
||||
HeartMeter.Instance.SetShopLevel(GameDataManager.GameData.ViewedShopLevel, true);
|
||||
|
||||
closeButton.OnClickAsObservable().Take(1).Subscribe(_ =>
|
||||
{
|
||||
GameDataManager.GameData.ViewedShopLevel = shopLevel;
|
||||
GameDataManager.GameData.OrderConditionCount = 0;
|
||||
// レシピ開放
|
||||
if (productData != null)
|
||||
{
|
||||
GameDataManager.GameData.MyRecipes = new List<int>(GameDataManager.GameData.MyRecipes){productData.id}.Distinct().ToArray();
|
||||
GameDataManager.GameData.DailyRecipeGetCount++;
|
||||
}
|
||||
GameDataManager.SaveGameData();
|
||||
|
||||
transform.SetLocalScale(0);
|
||||
backgroundAnimator.SetTrigger(CloseTrigger);
|
||||
this.CallWaitForSeconds(.25f, () =>
|
||||
|
|
@ -83,14 +84,12 @@ public class ShopLevelUp : MonoBehaviour
|
|||
{
|
||||
UpdateDialog.ShowDialog(() =>
|
||||
{
|
||||
HeartMeter.Instance.SetShopLevel(GameDataManager.GameData.ViewedShopLevel, true);
|
||||
LocalCacheManager.Load<Action>(CallbackTag, null)?.Invoke();
|
||||
LocalCacheManager.Remove(CallbackTag);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
HeartMeter.Instance.SetShopLevel(GameDataManager.GameData.ViewedShopLevel, true);
|
||||
LocalCacheManager.Load<Action>(CallbackTag, null)?.Invoke();
|
||||
LocalCacheManager.Remove(CallbackTag);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue