void Start() { // enable multi-touch if (Application.platform == RuntimePlatform.IPhonePlayer) { Input.multiTouchEnabled = true; } // find my camera myCameraScript = CS_Camera.Instance; myCamera = myCameraScript.GetComponent <Camera> (); }
private void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } myCamera = this.GetComponent <Camera> (); // get the default height of camera myHeight = this.transform.position.y; }