From a960f2170ae5b4c716feec082bec6126fe50aba7 Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 9 Jul 2021 09:46:41 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=81=A8Di?= =?UTF-8?q?spose=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs | 3 +++ popcorn/Assets/PopcornGameManager.cs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs index 9b6a45f0..d7e2ebf2 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CornManager.cs @@ -41,6 +41,7 @@ public class CornManager : MonoBehaviour cornArray = new Corn[cornSpawnCount]; result.AddTo(this); cornGrowSpeed.AddTo(this); + compositeDisposable.AddTo(this); } public void RespawnCorn() @@ -63,6 +64,7 @@ public class CornManager : MonoBehaviour cornArray[i] = corn; corn.SetCornProperty(baseCornPopTime, cornBurntDuration); + // 進行速度の変更時、コーン速度変更 cornGrowSpeed.TakeWhile(_ => !isCompleted).Subscribe(x => { // コーンが弾けた後はRedの場合のみ焦げ進行する @@ -80,6 +82,7 @@ public class CornManager : MonoBehaviour .FirstOrDefault() .Subscribe(_ => { + // ThermalCondition.Hot以外では焦げ進行なし if (!isHot) { corn.ChangeGrowSpeed(0f); diff --git a/popcorn/Assets/PopcornGameManager.cs b/popcorn/Assets/PopcornGameManager.cs index 70fe4ba3..71da3599 100644 --- a/popcorn/Assets/PopcornGameManager.cs +++ b/popcorn/Assets/PopcornGameManager.cs @@ -35,6 +35,8 @@ public class PopcornGameManager : MonoBehaviour // Start is called before the first frame update void Start() { + compositeDisposable.AddTo(this); + thermalControl.Condition.Subscribe(x => { cornManager.ChangeGrowSpeed(x);