From 033f86417c8cc826e8859125eec049327af2716a Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 15 Oct 2021 14:40:15 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=90=E3=82=A4=E3=83=96=E3=83=AC=E3=83=BC?= =?UTF-8?q?=E3=82=B7=E3=83=A7=E3=83=B3=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/MyGame/Scenes/Cooking/Scripts/CookingResult.cs | 6 +++++- .../Assets/MyGame/Scenes/CornField/Scripts/CornHarvester.cs | 1 + .../Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CookingResult.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CookingResult.cs index d09d6fa2..7428358b 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CookingResult.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/CookingResult.cs @@ -134,7 +134,11 @@ public class CookingResult : MonoBehaviour perfectResultObject.SetActive(result == CornResult.Perfect); goodResultObject.SetActive(result == CornResult.Good); failureResultObject.SetActive(result == CornResult.Failure); - + + if (result == CornResult.Failure) + { + VibrationManager.Instance.PlayVibrationDoubleStrong(); + } smokeEffect.SetActive(result == CornResult.Failure); glitterEffect.SetActive(result == CornResult.Perfect); diff --git a/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornHarvester.cs b/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornHarvester.cs index ea9f8b69..41bac280 100644 --- a/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornHarvester.cs +++ b/popcorn/Assets/MyGame/Scenes/CornField/Scripts/CornHarvester.cs @@ -58,6 +58,7 @@ public class CornHarvester : MonoBehaviour var finishedList = new List(); for (int i = 0; i < cnt; i++) { + VibrationManager.Instance.PlayVibrationOnce(); var corn = Instantiate(harvestedPrefab, harvestedSpawnTransform.position, Quaternion.identity, harvestedSpawnTransform); corn.GetComponent().AddForce(new Vector2(Random.Range(-0.3f, 0.3f), -1).normalized * thrust, ForceMode2D.Impulse); finishedList.Add(corn.GetComponent()); diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs index 3d2e5820..2b8c0125 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/MarketManager.cs @@ -139,6 +139,7 @@ public class MarketManager : MonoBehaviour private void GenerateCustomer(CustomerController controller) { var customerObject = new GameObject(); + customerObject.transform.parent = transform; customerObject.transform.localPosition = controller.transform.localPosition; // controllerが破棄のタイミングでこちらも破棄 controller.OnDestroyAsObservable().Subscribe(_ => @@ -206,6 +207,7 @@ public class MarketManager : MonoBehaviour } controller.Tapped(); customerAnimator.ShowTapReaction(); + VibrationManager.Instance.PlayVibrationOnce(); }).AddTo(customerAnimator); } } \ No newline at end of file