FairyGUI.Stage.GetTouchPosition C# (CSharp) Method

GetTouchPosition() public method

public GetTouchPosition ( int touchId ) : Vector2
touchId int
return Vector2
		public Vector2 GetTouchPosition(int touchId)
		{
			UpdateTouchPosition();

			if (touchId < 0)
				return _touchPosition;

			for (int j = 0; j < 5; j++)
			{
				TouchInfo touch = _touches[j];
				if (touch.touchId == touchId)
					return new Vector2(touch.x, touch.y);
			}

			return _touchPosition;
		}

Usage Example

Example #1
0
 static public int GetTouchPosition(IntPtr l)
 {
     try {
         FairyGUI.Stage self = (FairyGUI.Stage)checkSelf(l);
         System.Int32   a1;
         checkType(l, 2, out a1);
         var ret = self.GetTouchPosition(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.Stage::GetTouchPosition