Пример #1
0
 void Awake()
 {
     if (Application.platform == RuntimePlatform.WindowsPlayer)
     {
         tracking = InitTracking(new WM_TrackingComponent());
     }
 }
Пример #2
0
    void Update()
    {
        if (tracking == null)
        {
            return;
        }
        TuioComponentBase tr = tracking;

        UpdateTouches(tr);
    }
Пример #3
0
 void Awake()
 {
     if (Application.platform == RuntimePlatform.WindowsPlayer)
     {
         tracking = InitTracking(new WM_TrackingComponent());
     }
     //Application.wantsToQuit += ()=> {
     //    return false;
     //};
 }
Пример #4
0
    public void Update()
    {
        if (tracking == null)
        {
            enabled = false;
            return;
        }
        TuioComponentBase tr = tracking;

        UpdateTouches(tr);
    }
Пример #5
0
 TuioComponentBase InitTracking(TuioComponentBase tr)
 {
     tr.ScreenWidth  = Camera.main.pixelWidth;
     tr.ScreenHeight = Camera.main.pixelHeight;
     return(tr);
 }
Пример #6
0
 void UpdateTouches(TuioComponentBase tr)
 {
     tr.BuildTouchDictionary();
     touches    = tr.AllTouches.Values.Select(t => t.ToUnityTouch()).ToArray();
     touchCount = touches.Length;
 }
Пример #7
0
 void Awake()
 {
     tracking = InitTracking(new TuioTrackingComponent());
 }
Пример #8
0
	TuioComponentBase InitTracking(TuioComponentBase tr)
	{
		tr.ScreenWidth = Camera.main.pixelWidth;
		tr.ScreenHeight = Camera.main.pixelHeight;
		return tr;
	}
Пример #9
0
	void UpdateTouches(TuioComponentBase tr)
	{
		tr.BuildTouchDictionary();
		frameTouches = tr.AllTouches.Values.Select(t => t.ToUnityTouch()).ToArray();
		touchCount = frameTouches.Length;
	}
Пример #10
0
	void Awake()
	{
		tracking = InitTracking(new TuioTrackingComponent());
	}
Пример #11
0
	void Awake()
	{
		mouseSim = InitTracking(new MouseTrackingComponent());
	}
Пример #12
0
    void Update()
    {
        TuioComponentBase tr = mouseSim;

        UpdateTouches(tr);
    }
Пример #13
0
 void Awake()
 {
     mouseSim = InitTracking(new MouseTrackingComponent());
 }
Пример #14
0
	void Awake()
	{
		if (Application.platform == RuntimePlatform.WindowsPlayer) tracking = InitTracking(new WM_TrackingComponent());
	}