static public MouseOrTouch GetTouch (int id) { MouseOrTouch touch; if (!mTouches.TryGetValue(id, out touch)) { touch = new MouseOrTouch(); touch.touchBegan = true; mTouches.Add(id, touch); } return touch; }
// Update is called once per frame private void Update() { #if !UNITY_EDITOR try { #endif if (canTouch) { if (null != buffer) { var touch = UICamera.GetTouch(curTouchID); if (null != touch) { buffer.UpdatePostion(touch.pos); } } } #if !UNITY_EDITOR } catch (Exception ex) { Logger.Error(ex.ToString()); } #endif }