
Untitled
By: a guest on
Jul 15th, 2012 | syntax:
None | size: 0.62 KB | hits: 19 | expires: Never
C# global alias
#if UNITY_IPHONE
using iTouch = UnityEngine.Touch;
public class iTouchInput : MonoBehaviour {
public static iTouch[] getTouches() {
return Input.touches;
}
}
#else
public struct iTouch {
public int fingerId;
public Vector2 position;
public Vector2 deltaPosition;
public float deltaTime;
public int tapCount;
public iTouchPhase phase;
}
public class iTouchInput : MonoBehaviour {
private static iTouch[] touches;
public static iTouch[] getTouches() {
return touches;
}
}
#endif
#if UNITY_IPHONE
using iTouch = UnityEngine.Touch;
#endif