//それぞれ触れた時の処理 public void OnTriggerEnter(Collider other) { switch (other.gameObject.tag) { //リスタートポイントに触れたら case "RestartPoint": m_RestartPoint = other.transform; //リスタート位置を更新 break; //死亡壁に触れたら case "DestroyWall": if (isRespawn == false) { GetComponent <Rigidbody>().velocity = Vector3.zero; StartCoroutine(Respawn()); GetComponent <VR_PlayerWireAction>().JointConnectedBodyRelease(); GetComponent <VR_PlayerWireAction>().WireLineDelete(); GetComponent <VR_PlayerWireAction>().KnockBackTimeReset(); GetComponent <VR_PlayerWireAction>().EntryThrowObjsReset(); isRespawn = true; } break; //ゴールポイントに触れたら case "GoalPoint": sceneManager.GameClear(); timeLimit.CountStop(true); GetComponent <VR_PlayerWireAction>().MenuModeChange(true); break; } }