コード例 #1
0
 public void Update(GameTime gameTime)
 {
     Ball.Update(gameTime, this);
     PlayerPaddle.Update(gameTime, this);
     ComputerPaddle.Update(gameTime, this);
     Score.Update(ComputerPaddle.Score.ToString(), PlayerPaddle.Score.ToString());
 }
コード例 #2
0
 public void Draw(SpriteBatch spriteBatch)
 {
     Score.Draw(spriteBatch);
     PlayerPaddle.Draw(spriteBatch);
     ComputerPaddle.Draw(spriteBatch);
     Ball.Draw(spriteBatch);
 }
コード例 #3
0
ファイル: GameObjects.cs プロジェクト: pubgg/Pong-1
 public void Update(GameTime gameTime)
 {
     Ball.Update(gameTime, this);
     PlayerPaddle.Update(gameTime, this);
     ComputerPaddle.Update(gameTime, this);
     ComputerPaddle.UpdateBallPosition(Ball.Position, Ball.Direction);
     Score.Update(ComputerPaddle.Score.ToString(), PlayerPaddle.Score.ToString());
 }
コード例 #4
0
 public void Dispose()
 {
     Ball.Dispose();
     ComputerPaddle.Dispose();
     PlayerPaddle.Dispose();
 }