From 4e5666972c953a31af7a7592bacfa4863de7cc22 Mon Sep 17 00:00:00 2001 From: kimura Date: Thu, 30 Sep 2021 12:16:07 +0900 Subject: [PATCH] =?UTF-8?q?Corn=5Fsave=E3=81=AE=E5=86=8D=E7=94=9F=E6=99=82?= =?UTF-8?q?=E9=96=93=E4=BF=AE=E6=AD=A3/2->3=E3=81=AEGrow=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?/=E6=8C=99=E5=8B=95=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyGame/Scenes/CornField/Scripts/CornSeedling.cs | 9 +++++++-- .../Scenes/CornField/Scripts/CornSeedlingStageView.cs | 8 ++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornSeedling.cs b/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornSeedling.cs index 04ededdd..35af0fa8 100644 --- a/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornSeedling.cs +++ b/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornSeedling.cs @@ -51,13 +51,18 @@ public class CornSeedling : MonoBehaviour, IPointerEnterHandler { completed = false; compositeDisposable.Clear(); - UpdateStage(); beginTime = dateTime; period = periodTime; // resume対応 + UpdateStage(); + var currentStage = GetCurrentStage(); // 苗の状態復元 - seedlingView.SetView(rank, GetCurrentStage()); + seedlingView.SetView(rank, currentStage); + if (currentStage == SeedlingStage.Stage4) + { + completed = true; + } // 成長進捗度更新 Observable.Interval(TimeSpan.FromSeconds(1f)) diff --git a/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornSeedlingStageView.cs b/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornSeedlingStageView.cs index d1b51ec0..1eaf6ec7 100644 --- a/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornSeedlingStageView.cs +++ b/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornSeedlingStageView.cs @@ -32,7 +32,7 @@ public class CornSeedlingStageView : MonoBehaviour break; case SeedlingStage.Stage2: seedlingStage1.SetTrigger(Save); - this.CallWaitForSeconds(.25f, () => + this.CallWaitForSeconds(1f, () => { SetView(stage); seedlingStage2.SetTrigger(Grow); @@ -40,15 +40,15 @@ public class CornSeedlingStageView : MonoBehaviour break; case SeedlingStage.Stage3: seedlingStage2.SetTrigger(Save); - this.CallWaitForSeconds(.25f, () => + this.CallWaitForSeconds(1f, () => { SetView(stage); - seedlingStage4.SetTrigger(Grow); + seedlingStage3.SetTrigger(Grow); }); break; case SeedlingStage.Stage4: seedlingStage3.SetTrigger(Save); - this.CallWaitForSeconds(.25f, () => + this.CallWaitForSeconds(1f, () => { SetView(stage); seedlingStage4.SetTrigger(Grow);