void Awake() { if (Application.platform == RuntimePlatform.WindowsPlayer) { tracking = InitTracking(new WM_TrackingComponent()); } }
void Update() { if (tracking == null) { return; } TuioComponentBase tr = tracking; UpdateTouches(tr); }
void Awake() { if (Application.platform == RuntimePlatform.WindowsPlayer) { tracking = InitTracking(new WM_TrackingComponent()); } //Application.wantsToQuit += ()=> { // return false; //}; }
public void Update() { if (tracking == null) { enabled = false; return; } TuioComponentBase tr = tracking; UpdateTouches(tr); }
TuioComponentBase InitTracking(TuioComponentBase tr) { tr.ScreenWidth = Camera.main.pixelWidth; tr.ScreenHeight = Camera.main.pixelHeight; return(tr); }
void UpdateTouches(TuioComponentBase tr) { tr.BuildTouchDictionary(); touches = tr.AllTouches.Values.Select(t => t.ToUnityTouch()).ToArray(); touchCount = touches.Length; }
void Awake() { tracking = InitTracking(new TuioTrackingComponent()); }
TuioComponentBase InitTracking(TuioComponentBase tr) { tr.ScreenWidth = Camera.main.pixelWidth; tr.ScreenHeight = Camera.main.pixelHeight; return tr; }
void UpdateTouches(TuioComponentBase tr) { tr.BuildTouchDictionary(); frameTouches = tr.AllTouches.Values.Select(t => t.ToUnityTouch()).ToArray(); touchCount = frameTouches.Length; }
void Awake() { mouseSim = InitTracking(new MouseTrackingComponent()); }
void Update() { TuioComponentBase tr = mouseSim; UpdateTouches(tr); }
void Awake() { if (Application.platform == RuntimePlatform.WindowsPlayer) tracking = InitTracking(new WM_TrackingComponent()); }