public static void CamResizeToSmall() { if (Gcam.myLoc == 0) { Gcam.rotable = true; } Gcam.touchable = true; float mainWidth = Screen.width; float mainHeight = Screen.height; float itemWidth = mainWidth / 10; float itemHeight = itemWidth; float itemPercent = itemHeight / mainHeight; Rect rect = Ggos.g.goItemCamera.GetComponent <Camera>().rect; rect.Set(0.9f, 0f, 0.1f, itemPercent); Ggos.g.goItemCamera.GetComponent <Camera>().rect = rect; Ggos.g.goItemCamera.GetComponent <Camera>().orthographicSize = 0.11f; Gmenu.MenuUnHide(); Ggos.g.goCrossImg2.SetActive(false); Ggos.g.goItemCamera.transform.position = itemPos[activeItem]; Ggos.g.goBacks.SetActive(false); isMenu = false; }
public static void CamResizeToFull() { Gcam.rotable = false; Gcam.touchable = false; Rect rect = Ggos.g.goItemCamera.GetComponent <Camera>().rect; rect.Set(0f, 0f, 1f, 1f); Ggos.g.goItemCamera.GetComponent <Camera>().rect = rect; Ggos.g.goItemCamera.GetComponent <Camera>().orthographicSize = 0.9f; Gmenu.MenuHide(false); Ggos.g.goCrossImg2.SetActive(true); Ggos.g.goItemCamera.transform.position = itemPos[45]; Ggos.g.goBacks.SetActive(true); isMenu = true; }