void OnTriggerEnter(Collider other) { if (other.tag == "Player") { if (!(other.bounds.max.x > collider.bounds.max.x)) { // enter on right if (!cameraOnRight) { moveToRight(); ccObj.setClamp(); } } } }
void Start() { Debug.Log("changeClamp start"); ccObj = Camera.main.GetComponent <ClampCamera>(); Debug.Log("cameraOnRight: " + cameraOnRight); if (cameraOnRight && SaveLoadSystem.getInstance().atriumSceneStateArr[(int)SaveLoadSystem.AtriumSceneState.FROMLG2]) { Debug.Log("Load camera"); moveToLeft(); ccObj.setClamp(); } }