示例#1
0
        protected override void Update()
        {
            base.Update();

            //updateServerProperties();
        }

        private void OnCursorAdded(object sender, TUIOCursorEventArgs tuioCursorEventArgs)
示例#2
0
        private void OnCursorAdded(object sender, TUIOCursorEventArgs tuioCursorEventArgs)
        {
            var cursor = tuioCursorEventArgs.Cursor;

            lock (sync) {
                var x = cursor.X * ScreenWidth;
                var y = (1 - cursor.Y) * ScreenHeight;
                cursorToInternalId.Add(cursor, beginTouch(new Vector2(x, y)));
            }
        }
示例#3
0
            var cursor = tuioCursorEventArgs.Cursor;
            lock (sync) {
                var x = cursor.X*ScreenWidth;
                var y = (1 - cursor.Y)*ScreenHeight;
                cursorToInternalId.Add(cursor, beginTouch(new Vector2(x, y)));
            }
        }

        private void OnCursorRemoved(object sender, TUIOCursorEventArgs tuioCursorEventArgs)
        {
            var cursor = tuioCursorEventArgs.Cursor;
示例#4
0
        private void OnCursorRemoved(object sender, TUIOCursorEventArgs tuioCursorEventArgs)
        {
            var cursor = tuioCursorEventArgs.Cursor;

            lock (sync) {
                int existingCursor;
                if (!cursorToInternalId.TryGetValue(cursor, out existingCursor))
                {
                    return;
                }

                cursorToInternalId.Remove(cursor);
                endTouch(existingCursor);
            }
        }
示例#5
0
        private void OnCursorUpdated(object sender, TUIOCursorEventArgs tuioCursorEventArgs)
        {
            var cursor = tuioCursorEventArgs.Cursor;

            lock (sync) {
                int existingCursor;
                if (!cursorToInternalId.TryGetValue(cursor, out existingCursor))
                {
                    return;
                }

                var x = cursor.X * ScreenWidth;
                var y = (1 - cursor.Y) * ScreenHeight;

                moveTouch(existingCursor, new Vector2(x, y));
            }
        }
示例#6
0
                int existingCursor;
                if (!cursorToInternalId.TryGetValue(cursor, out existingCursor)) return;

                cursorToInternalId.Remove(cursor);
                endTouch(existingCursor);
            }
        }

        private void OnCursorUpdated(object sender, TUIOCursorEventArgs tuioCursorEventArgs)
        {
            var cursor = tuioCursorEventArgs.Cursor;
            lock (sync) {
                int existingCursor;