Exemple #1
0
    private void Update()
    {
        counter += Time.deltaTime;
        if (Input.GetKey("v") == true && counter >= 1f)
        {
            counter   = 0;
            switcher += 1;
        }

        if (switcher % 2 == 0)//Third
        {
            do
            {
                //因為從SkyCam切回來時 第三人稱攝影機位置會跑掉
                //所以要把第三人稱攝影機位置的位置指定為一開始指定的初始位置
                //do while在這裡面應該只會執行一次
            } while (switcher % 2 != 0);
            SkyCam.SetActive(false);
            ThirdCam.SetActive(true);
            GameObject.Find("ThirdCamManager").GetComponent <ThirdCamFollow>().enabled = true;
        }
        else if (switcher % 2 == 1)//SkyCam
        {
            SkyCam.SetActive(true);
            ThirdCam.SetActive(false);
            GameObject.Find("ThirdCamManager").GetComponent <ThirdCamFollow>().enabled = false;
        }
    }
Exemple #2
0
    IEnumerator camChange()
    {
        yield return(new WaitForSeconds(0.01f));

        if (camMode == 0)
        {
            FirstCam.SetActive(false);
            ThirdCam.SetActive(true);
            RotCam.SetActive(false);
            aimCam.SetActive(false);
        }
        if (camMode == 1)
        {
            FirstCam.SetActive(true);
            ThirdCam.SetActive(false);
            RotCam.SetActive(false);
            aimCam.SetActive(false);
        }
        if (camMode == 2)
        {
            FirstCam.SetActive(false);
            ThirdCam.SetActive(false);
            RotCam.SetActive(true);
            aimCam.SetActive(false);
        }
    }
Exemple #3
0
    IEnumerator aimChange()
    {
        yield return(new WaitForSeconds(0.3f));

        FirstCam.SetActive(false);
        ThirdCam.SetActive(false);
        RotCam.SetActive(false);
        aimCam.SetActive(true);
    }
Exemple #4
0
 private void Awake()
 {
     SkyCam.SetActive(false);
     ThirdCam.SetActive(true);
 }