コード例 #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
ファイル: PongGame.cs プロジェクト: manlok876/PongTemplate
 private void ResetGameState()
 {
     gameState = new PongGameState();
 }