From 499ced202c176a1c6dc1f99456b9d01f99085e29 Mon Sep 17 00:00:00 2001 From: kimura Date: Tue, 20 Jul 2021 15:29:21 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=B3=E9=A3=9B=E3=81=B3?= =?UTF-8?q?=E5=87=BA=E3=81=97=E3=81=AF=E6=BC=94=E5=87=BA=E7=99=BA=E7=94=9F?= =?UTF-8?q?=E3=81=AE=E3=81=BF=E3=81=A7=E3=82=B3=E3=83=BC=E3=83=B3=E3=81=AE?= =?UTF-8?q?=E9=A3=9B=E3=81=B3=E5=87=BA=E3=81=97=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs index 55887797..d07adab5 100644 --- a/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs +++ b/popcorn/Assets/MyGame/Scenes/Cooking/Scripts/Corn.cs @@ -129,19 +129,12 @@ public class Corn : MonoBehaviour { spriteRenderer.sprite = cornBurntSprite; animator.SetTrigger(HashCornBurn); - Instantiate(effectBurnt, transform); + var effect = Instantiate(effectBurnt, transform); + this.CallWaitForSeconds(.8f, () => Destroy(effect)); } private void CornSpilled(CornCondition prevCondition) { - GetComponent().enabled = false; - // フライパンに追従しないようにparent解除 - transform.parent = null; - this.CallWaitForSeconds(.5f, () => Destroy(gameObject)); - if (prevCondition == CornCondition.Seed) - { - VibrationManager.Instance.PlayVibrationOnce(); - } } public void SetCornProperty(float popTime, float burntDuration, float spillSpeed, float popSpeed)