示例#1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.touchCount > 0)
        {
            switch (Input.GetTouch(0).phase)
            {
            case TouchPhase.Began:
                scrolling = manualScrolling;
                break;

            case TouchPhase.Ended:
                scrolling = autoScrolling;
                break;

            default:
                break;
            }
        }

        scrolling();
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     transform.position = new Vector3(0, yStart, 0);
     scrolling          = autoScrolling;
 }