コード例 #1
0
 //死亡時処理
 private void BossDie()
 {
     Instantiate(bossExplosionPrefab, transform.position, transform.rotation);
     Destroy(this.gameObject, 2.5f);
     sceneManager.GameClear();
     GameObject.FindGameObjectWithTag(TagName.PLAYER).GetComponent <VR_PlayerWireAction>().MenuModeChange(true);
 }
コード例 #2
0
    //それぞれ触れた時の処理
    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;
        }
    }