/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Black); spriteBatch.Begin(); if (GlobalAcc.StanGry == GameState.Game || GlobalAcc.StanGry == GameState.ChangingToGameFromMenuP2) { Mapy.Rysuj(ref spriteBatch); spriteBatch.DrawString(TestowyFont, GlobalAcc.StatekGracza.IloscPkt.ToString(), new Vector2(300f, 0), Color.White); } if (GlobalAcc.StanGry == GameState.Menu || GlobalAcc.StanGry == GameState.ChangingToInfoFromMenuP1 || GlobalAcc.StanGry == GameState.ChangingToGameFromMenuP1 || GlobalAcc.StanGry == GameState.ChangingToMenuFromInfoP2 || GlobalAcc.StanGry == GameState.ChangingToMenuFromGameP2 || GlobalAcc.StanGry == GameState.ChangingToMenuFromHelpP2 || GlobalAcc.StanGry == GameState.ChangingToHelpFromMenuP1) { Menu.Rysuj(ref spriteBatch); } if (GlobalAcc.StanGry == GameState.Info || GlobalAcc.StanGry == GameState.ChangingToInfoFromMenuP2 || GlobalAcc.StanGry == GameState.ChangingToMenuFromInfoP1) { Info.Rysuj(ref spriteBatch); } if (GlobalAcc.StanGry == GameState.Help || GlobalAcc.StanGry == GameState.ChangingToHelpFromMenuP2 || GlobalAcc.StanGry == GameState.ChangingToMenuFromHelpP1) { Help.Rysuj(ref spriteBatch); } spriteBatch.DrawString(TestowyFont, iloscfps, Vector2.Zero, Color.White); spriteBatch.End(); base.Draw(gameTime); }
/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Black); spriteBatch.Begin(); if (GlobalAcc.StanGry == GameState.Game) { Mapy.Rysuj(ref spriteBatch); spriteBatch.DrawString(TestowyFont, GlobalAcc.StatekGracza.IloscPkt.ToString(), new Vector2(300f, 0), Color.White); } if (GlobalAcc.StanGry == GameState.Menu) { spriteBatch.DrawString(TestowyFont, iloscfps, Vector2.Zero, Color.White); } spriteBatch.End(); base.Draw(gameTime); }