예제 #1
0
        /// <summary>
        /// Update the elements appearing in this screen
        /// </summary>
        /// <param name="gameTime">Snapshot of the gameTiming of the game</param>
        public void Update(GameTime gameTime)
        {
            TouchCollection touches = TouchPanel.GetState();

            if (touches.Count > 0)
            {
                if (touches[0].Position.Y > _playPosition.Y)
                {
                    ScreenPongGameState = PongGameState.Play;
                }
                //else
                //{
                //    ScreenPongGameState = PongGameState.Start;
                //}
            }
            //else
            //{
            //    ScreenPongGameState = PongGameState.Start;
            //}
        }
예제 #2
0
 private void ResetGameState()
 {
     gameState = new PongGameState();
 }