void Start() { visibleObjects = new List <GameObject>(); cam = GetComponent <Camera>(); zoomLevel = zoomLevels.MIDRANGE; cam.orthographicSize = (int)zoomLevel; }
private void zoomToLevel(zoomLevels targetZoomLvl) { zoomLevel = targetZoomLvl; //if (targetZoomLvl == zoomLevels.CLOSEUP) //{ // cam.orthographicSize = zoomVals; //} //if(targetZoomLvl == zoomLevels.MIDRANGE) //{ // cam.orthographicSize = 16; //} //if (targetZoomLvl == zoomLevels.WIDE) //{ // cam.orthographicSize = 32; //} cam.orthographicSize = (int)targetZoomLvl; }
private void zoomToLevel(zoomLevels targetZoomLvl) { zoomLevel = targetZoomLvl; //if (targetZoomLvl == zoomLevels.CLOSEUP) //{ // cam.orthographicSize = zoomVals; //} //if(targetZoomLvl == zoomLevels.MIDRANGE) //{ // cam.orthographicSize = 16; //} //if (targetZoomLvl == zoomLevels.WIDE) //{ // cam.orthographicSize = 32; //} //cam.transform.position = new Vector3(cam.transform.position.x, 0f, cam.transform.position.z); cam.orthographicSize = (int)targetZoomLvl; }