//なすがプレイヤーまたは地面に当たった際の判定 void OnTriggerEnter2D(Collider2D col) { isGround = playerControll.GroundCheck(); if (col.gameObject.tag == "Player" && !isGround) { gameRule.NasuPointAdd(); Destroy(gameObject); } if (col.gameObject.tag == "Ground") { Destroy(gameObject); gameRule.EnableGameOver(); } }