예제 #1
0
        public static WrappedTouch FromTouch(Touch touch)
        {
            WrappedTouch wrappedTouch = new WrappedTouch()
            {
                Position = touch.position, FingerId = touch.fingerId
            };

            return(wrappedTouch);
        }
예제 #2
0
        private static List <WrappedTouch> GetTouchesFromInputTouches()
        {
            List <WrappedTouch> touches = new List <WrappedTouch>();

            foreach (var touch in Input.touches)
            {
                touches.Add(WrappedTouch.FromTouch(touch));
            }
            return(touches);
        }
예제 #3
0
        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);
        }