private void inicioJogo(List <String> infosPartida) { Console.SetCursorPosition((Console.WindowWidth - 33) / 2, 1); Console.Write("Aperte Enter para começar o jogo!"); placar = new Placar(); player1 = new Player(infosPartida[0], infosPartida[1]); player2 = new Player(infosPartida[2], infosPartida[3], true); bola = new Bola(player1, player2, placar); renderizaObjetos(); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here Largura = GraphicsDevice.Viewport.Width; // Pega a Largura da tela que por Default é 800 Pixels. Altura = GraphicsDevice.Viewport.Height; // Pega a Altura da tela que por Default é 480 Pixels. jogador1 = new Jogador(); // Cria uma nova Instacia para a variavel jogador jogador2 = new Jogador(); // " " " bola = new Bola(); // " " " base.Initialize(); }