コード例 #1
0
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            TouchCollection state = TouchPanel.GetState();

            if (state.Count > 0)
            {
                Position       = new Point[state.Count];
                PressedKeys[0] = GameKey.TouchLeftPressed;

                for (int i = 0; i < Position.Length; i++)
                {
                    Position[i] = camManager.ScaleMouseToScreenCoordinates(state[i].Position).ToPoint();
                }
            }
            else
            {
                PressedKeys[0] = GameKey.TouchLeftReleased;
            }
        }