// 何かにぶつかったら呼ばれる void OnCollisionEnter2D(Collision2D collision) { StartCoroutine(GameOver()); if (playDieSoundFlg && collision.gameObject.name.Equals("lv1_background_ground1") == false) { dieSound.Play(); playDieSoundFlg = false; } if (playHitSoundFlg) { StartCoroutine("fadeWhiteAppear"); hitSound.Play(); playHitSoundFlg = false; } StartCoroutine("appearGameOverButton"); createObject.stopPipes(); createObject.stopGrounds(); createObject.stopCreate(); StartCoroutine("appearStartButton"); moveResultFlg = true; scoreCon.StartCoroutine("viewDisableScore"); createObject.disablePipesTrigger(); animator.ResetTrigger("DoFlap"); }