//衝突時に呼ばれる関数 void OnCollisionEnter(Collision collision) { switch (tag) { case "SmallStarTag": gameController.AddPoint(1); break; case "LargeStarTag": gameController.AddPoint(3); break; case "SmallCloudTag": gameController.AddPoint(2); break; case "LargeCloudTag": gameController.AddPoint(5); break; default: gameController.AddPoint(0); break; } Debug.Log(tag); }