// Update is called once per frame void Update() { if (gamestart == true) { if (zoom > 0) { zoom -= 0.04f; } if (zoom <= 14 && zoom > 8) { if (zoom < 8) { zoom = 8; } Maincamera.GetComponent <Camera>().orthographicSize = zoom; } else { if (zoom < 6) { window.SetActive(true); fader.SetActive(false); gamestart = false; } } } }
//캠 설정 void FollowCamera() { Maincamera maincamera = GameObject.Find("Main Camera").GetComponent <Maincamera>(); if (target.rightclick == true || target.leftclick == true) //오브젝트의 왼쪽클릭 또는 오른쪽 클릭이 true일 경우 { maincamera.target = this.target; //maincamera의 target이 선택된 오브젝트. } else { maincamera.target = null; } }