标签:
void Update() { if (Input.touchCount == 1) { Vector3 wp = Camera.main.ScreenToWorldPoint(Input.GetTouch(0).position); Vector2 touchPos = new Vector2(wp.x, wp.y); if (collider2D == Physics2D.OverlapPoint(touchPos)) { //your code } } }
标签:
原文地址:http://www.cnblogs.com/ninja9998877/p/4339036.html