示例#1
0
    void Start()
    {
        // enable multi-touch
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            Input.multiTouchEnabled = true;
        }

        // find my camera
        myCameraScript = CS_Camera.Instance;
        myCamera       = myCameraScript.GetComponent <Camera> ();
    }
示例#2
0
    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;
    }