Esempio n. 1
0
        protected override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            pointerService.GetState(pointerState);

            foreach (var point in pointerState.Points)
            {
                AddEvent(point);
            }
        }
Esempio n. 2
0
        public override void Update(ITimeService time)
        {
            PointerState state = pointerService.GetState();

            foreach (var point in state.Points)
            {
                switch (point.EventType)
                {
                case PointerEventType.Pressed:
                    PointerPressed(point, time);
                    break;

                case PointerEventType.Moved:
                    PointerMoved(point, time);
                    break;

                case PointerEventType.Released:
                    PointerReleased(point, time);
                    break;
                }
            }
        }