/// <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) { CharacterPosition = CharacterSprite.Position; GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(); BackGroundSprite.draw(spriteBatch, originalViewPort.Bounds); CharacterSprite.text = CharacterSprite.Position.ToString(); CharacterSprite.draw(spriteBatch, GameFont); CharacterSprite.draw(spriteBatch); //spriteBatch.Draw(_txBackGround, originalViewPort.Bounds, Color.White); //spriteBatch.Draw(_txCharacter, CharacterPosition, Color.White); spriteBatch.End(); GraphicsDevice.Viewport = mapViewport; spriteBatch.Begin(); DotSprite.draw(spriteBatch, 0.1f); BackGroundSprite.draw(spriteBatch, mapViewport.Bounds); DotSprite.text = DotSprite.Position.ToString(); DotSprite.draw(spriteBatch, scale); //spriteBatch.Draw(_txDot, CharacterPosition * 0.1f, // null, Color.White, 0f, Vector2.Zero, 0.1f, SpriteEffects.None, 0); //spriteBatch.Draw(_txBackGround, mapViewport.Bounds, Color.White); spriteBatch.End(); // TODO: Add your drawing code here GraphicsDevice.Viewport = originalViewPort; 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) { // main GraphicsDevice.Viewport = mainViewport; GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(); background.draw(spriteBatch); redghost.draw(spriteBatch); blueghost.draw(spriteBatch); ground.draw(spriteBatch); redghost.displayMessage(colMsg, spriteBatch, msgFont, Color.PaleVioletRed); blueghost.displayMessage(colMsg, spriteBatch, msgFont, Color.BlueViolet); spriteBatch.DrawString(msgFont, colMsg, new Vector2(blueghost.Position.X + 40f, blueghost.Position.Y + 10f), Color.AntiqueWhite); spriteBatch.End(); //map GraphicsDevice.Viewport = mainViewport; spriteBatch.Begin(); background.draw(spriteBatch); redghost.draw(spriteBatch); blueghost.draw(spriteBatch); ground.draw(spriteBatch); 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) { CharacterPosition = CharacterSprite.Position; GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(); BackGroundSprite.draw(spriteBatch, originalViewPort.Bounds); CharacterSprite.text = CharacterSprite.Position.ToString(); CharacterSprite.draw(spriteBatch, GameFont); LipsSprite.text = LipsSprite.Position.ToString(); LipsSprite.draw(spriteBatch, GameFont); //CharacterSprite.draw(spriteBatch); //spriteBatch.Draw(_txBackGround, originalViewPort.Bounds, Color.White); //spriteBatch.Draw(_txCharacter, CharacterPosition, Color.White); spriteBatch.End(); GraphicsDevice.Viewport = mapViewport; spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend); frameSprite.draw(spriteBatch, scale); BackGroundSprite.draw(spriteBatch, scale); CharacterSprite.draw(spriteBatch, scale); LipsSprite.draw(spriteBatch, scale); spriteBatch.End(); // TODO: Add your drawing code here GraphicsDevice.Viewport = originalViewPort; 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.Viewport = originalViewPort; GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(); //spriteBatch.Draw(_txBackGround, originalViewPort.Bounds, Color.White); //spriteBatch.Draw(_txCharacter, CharacterPosition, Color.White); background.drawVP(spriteBatch, originalViewPort.Bounds); character1.draw(spriteBatch); spriteBatch.End(); GraphicsDevice.Viewport = mapViewport; //SpriteBatch spriteBatch.Begin(); //spriteBatch.Draw(_txDot, CharacterPosition * 0.1f, null, Color.White, 0f, Vector2.Zero, 0.1f, SpriteEffects.None, 0); //spriteBatch.Draw(_txBackGround, mapViewport.Bounds, Color.White); dot.draw(spriteBatch); background.drawVP(spriteBatch, mapViewport.Bounds); //dot.draw(spriteBatch); spriteBatch.End(); // TODO: Add your drawing code here 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.CornflowerBlue); spriteBatch.Begin(); background.draw(spriteBatch); character1.draw(spriteBatch); character2.draw(spriteBatch); spriteBatch.DrawString(gameFont, collisionText, new Vector2(10, 10), Color.White); spriteBatch.End(); // TODO: Add your drawing code here 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.CornflowerBlue); spriteBatch.Begin(); background.draw(spriteBatch); character1.draw(spriteBatch); character2.draw(spriteBatch); spriteBatch.DrawString(collisionFont, collisionMessage, new Vector2(150, 150), Color.White); character1.drawString(spriteBatch, collisionFont); character2.drawString(spriteBatch, collisionFont); spriteBatch.End(); base.Draw(gameTime); }