コーン飛び出しは演出発生のみでコーンの飛び出し処理を削除

This commit is contained in:
kimura 2021-07-20 15:29:21 +09:00
parent 811ffa0cf1
commit 499ced202c
1 changed files with 2 additions and 9 deletions

View File

@ -129,19 +129,12 @@ public class Corn : MonoBehaviour
{ {
spriteRenderer.sprite = cornBurntSprite; spriteRenderer.sprite = cornBurntSprite;
animator.SetTrigger(HashCornBurn); animator.SetTrigger(HashCornBurn);
Instantiate(effectBurnt, transform); var effect = Instantiate(effectBurnt, transform);
this.CallWaitForSeconds(.8f, () => Destroy(effect));
} }
private void CornSpilled(CornCondition prevCondition) private void CornSpilled(CornCondition prevCondition)
{ {
GetComponent<Collider2D>().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) public void SetCornProperty(float popTime, float burntDuration, float spillSpeed, float popSpeed)