public static WrappedTouch FromTouch(Touch touch) { WrappedTouch wrappedTouch = new WrappedTouch() { Position = touch.position, FingerId = touch.fingerId }; return(wrappedTouch); }
private static List <WrappedTouch> GetTouchesFromInputTouches() { List <WrappedTouch> touches = new List <WrappedTouch>(); foreach (var touch in Input.touches) { touches.Add(WrappedTouch.FromTouch(touch)); } return(touches); }
private static List <WrappedTouch> GetTouchesFromInputTouches() { List <WrappedTouch> touches = new List <WrappedTouch>(); #if USE_TOUCHSCRIPT foreach (var touch in TouchManager.ActiveTouches) { touches.Add(WrappedTouchFrom(touch)); } #else foreach (var touch in Input.touches) { touches.Add(WrappedTouch.FromTouch(touch)); } #endif return(touches); }