fix result
This commit is contained in:
parent
930234b0d1
commit
1ece653773
|
|
@ -1115,7 +1115,7 @@ MonoBehaviour:
|
|||
materialAmountText: {fileID: 5034752974931089885}
|
||||
detailOffset: 250
|
||||
progressDuration: 1.5
|
||||
waitButtonActive: 3
|
||||
waitButtonActive: 1.5
|
||||
waitProgress: 1.5
|
||||
--- !u!1 &5034752975247083714
|
||||
GameObject:
|
||||
|
|
|
|||
|
|
@ -82,7 +82,9 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
#if UNITY_EDITOR
|
||||
recipePlaceData = prevPlaceScore < recipePlaceData.needScore ? recipePlaceData : null;
|
||||
#endif
|
||||
if (recipePlaceData != null && placeScoreData.Score >= recipePlaceData.needScore)
|
||||
var hasRecipeData = recipePlaceData != null;
|
||||
var achievedRecipe = hasRecipeData && placeScoreData.Score >= recipePlaceData.needScore;
|
||||
if (achievedRecipe)
|
||||
{
|
||||
if (!gameData.MyRecipes.Contains(recipePlaceData.recipeId))
|
||||
{
|
||||
|
|
@ -96,30 +98,25 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
gameObject.SetActive(true);
|
||||
titleObject.SetActive(true);
|
||||
detailObject.SetActive(true);
|
||||
detailObject.transform.SetLocalPositionY(hasRecipeData ? defaultDetailObjectPos.y : detailOffset);
|
||||
|
||||
// 商品獲得済みならレシピ非表示
|
||||
if (recipePlaceData is null)
|
||||
if (hasRecipeData)
|
||||
{
|
||||
// detailの表示位置変更
|
||||
detailObject.transform.SetLocalPositionY(detailOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
detailObject.transform.SetLocalPositionY(defaultDetailObjectPos.y);
|
||||
meterObject.SetActive(true);
|
||||
SetProgress((float)prevPlaceScore / recipePlaceData.needScore, false);
|
||||
this.CallWaitForSeconds(waitProgress, () =>
|
||||
{
|
||||
SetProgress((float)placeScoreData.Score / recipePlaceData.needScore, true, () =>
|
||||
{
|
||||
if (placeScoreData.Score >= recipePlaceData.needScore)
|
||||
if (achievedRecipe)
|
||||
{
|
||||
ShopItemExchangeView.ShowDialog(shopDataList.FirstOrDefault(data => data.itemId == recipePlaceData.recipeId && data.Category == ItemCategory.Recipe));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
this.CallWaitForSeconds(waitButtonActive, () =>
|
||||
this.CallWaitForSeconds(hasRecipeData ? waitProgress + waitButtonActive : waitButtonActive, () =>
|
||||
{
|
||||
closeButton.gameObject.SetActive(true);
|
||||
retryButton.gameObject.SetActive(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue