Inheritance: System.EventArgs
Example #1
0
        private void OnBlobRemoved(object sender, TuioBlobEventArgs e)
        {
            var entity = e.Blob;
            lock (this)
            {
                ITouch touch;
                if (!blobToInternalId.TryGetValue(entity, out touch)) return;

                blobToInternalId.Remove(entity);
                endTouch(touch.Id);
            }
        }
Example #2
0
        private void OnBlobUpdated(object sender, TuioBlobEventArgs e)
        {
            var entity = e.Blob;
            lock (this)
            {
                ITouch touch;
                if (!blobToInternalId.TryGetValue(entity, out touch)) return;

                var x = entity.X * screenWidth;
                var y = (1 - entity.Y) * screenHeight;

                moveTouch(touch.Id, new Vector2(x, y));
                updateBlobProperties(touch, entity);
            }
        }
Example #3
0
 private void OnBlobAdded(object sender, TuioBlobEventArgs e)
 {
     var entity = e.Blob;
     lock (this)
     {
         var x = entity.X * screenWidth;
         var y = (1 - entity.Y) * screenHeight;
         var touch = beginTouch(new Vector2(x, y), new Tags(BlobTags));
         updateBlobProperties(touch, entity);
         blobToInternalId.Add(entity, touch);
     }
 }