private void DrawFrameEdges(SpriteBatch spriteBatch) { //frame edges spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.Opaque, SamplerState.LinearWrap, DepthStencilState.Default, RasterizerState.CullNone); spriteBatch.Draw(menuLeftConnectorFrame.texture, new Vector2(100, 150 + menuBotRightCornerFrame.GetHeight()), new Rectangle(0, 0, menuLeftConnectorFrame.GetWidth(), GameController.ScreenHeight - 250 - (menuBotRightCornerFrame.GetHeight() * 2)), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0); spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.Opaque, SamplerState.LinearWrap, DepthStencilState.Default, RasterizerState.CullNone); spriteBatch.Draw(menuRightConnectorFrame.texture, new Vector2(GameController.ScreenWidth - 100 - menuBotRightCornerFrame.GetWidth(), 150 + menuBotRightCornerFrame.GetHeight()), new Rectangle(0, 0, menuLeftConnectorFrame.GetWidth(), GameController.ScreenHeight - 250 - (menuBotRightCornerFrame.GetHeight() * 2)), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0); spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.Opaque, SamplerState.LinearWrap, DepthStencilState.Default, RasterizerState.CullNone); spriteBatch.Draw(menuBotConnectorFrame.texture, new Vector2(100 + menuTopLeftCornerFrame.GetWidth(), 150), new Rectangle(0, 0, GameController.ScreenWidth - 200 - menuTopRightCornerFrame.GetWidth() * 2, menuTopConnectorFrame.GetHeight()), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0); spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.Opaque, SamplerState.LinearWrap, DepthStencilState.Default, RasterizerState.CullNone); spriteBatch.Draw(menuBotConnectorFrame.texture, new Vector2(100 + menuTopLeftCornerFrame.GetWidth(), GameController.ScreenHeight - 100 - menuTopLeftCornerFrame.GetHeight()), new Rectangle(0, 0, GameController.ScreenWidth - 200 - menuTopRightCornerFrame.GetWidth() * 2, menuTopConnectorFrame.GetHeight()), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0); spriteBatch.End(); }
private void DrawFrameCorners(SpriteBatch spriteBatch) { spriteBatch.Begin(); //corners spriteBatch.Draw(menuBackground, new Rectangle(100, 150, GameController.ScreenWidth - 200, GameController.ScreenHeight - 250), Color.White); spriteBatch.Draw(menuTopLeftCornerFrame.texture, new Rectangle(100, 150, menuTopLeftCornerFrame.GetWidth(), menuTopLeftCornerFrame.GetHeight()), Color.White); spriteBatch.Draw(menuTopRightCornerFrame.texture, new Rectangle(GameController.ScreenWidth - 100 - menuTopRightCornerFrame.GetWidth(), 150, menuTopRightCornerFrame.GetWidth(), menuTopRightCornerFrame.GetHeight()), Color.White); spriteBatch.Draw(menuBotLeftCornerFrame.texture, new Rectangle(100, GameController.ScreenHeight - 100 - menuBotLeftCornerFrame.GetHeight(), menuBotLeftCornerFrame.GetWidth(), menuBotLeftCornerFrame.GetHeight()), Color.White); spriteBatch.Draw(menuBotRightCornerFrame.texture, new Rectangle(GameController.ScreenWidth - 100 - menuTopRightCornerFrame.GetWidth(), GameController.ScreenHeight - 100 - menuBotLeftCornerFrame.GetHeight(), menuBotLeftCornerFrame.GetWidth(), menuBotLeftCornerFrame.GetHeight()), Color.White); spriteBatch.End(); }
private void DrawFrameCorners(SpriteBatch spriteBatch) { spriteBatch.Begin(); //corners spriteBatch.Draw(scoreboardBackground, new Rectangle(0, 0, GameController.ScreenWidth, scoreboardHeight), Color.White); spriteBatch.Draw(scoreboardTopLeftCornerFrame.texture, new Rectangle(0, 0, scoreboardTopLeftCornerFrame.GetWidth(), scoreboardTopLeftCornerFrame.GetHeight()), Color.White); spriteBatch.Draw(scoreboardTopRightCornerFrame.texture, new Rectangle(GameController.ScreenWidth - scoreboardTopRightCornerFrame.GetWidth(), 0, scoreboardTopRightCornerFrame.GetWidth(), scoreboardTopRightCornerFrame.GetHeight()), Color.White); spriteBatch.Draw(scoreboardBotLeftCornerFrame.texture, new Rectangle(0, scoreboardHeight - scoreboardBotLeftCornerFrame.GetHeight(), scoreboardBotLeftCornerFrame.GetWidth(), scoreboardBotLeftCornerFrame.GetHeight()), Color.White); spriteBatch.Draw(scoreboardBotRightCornerFrame.texture, new Rectangle(GameController.ScreenWidth - scoreboardBotRightCornerFrame.GetWidth(), scoreboardHeight - scoreboardBotLeftCornerFrame.GetHeight(), scoreboardBotLeftCornerFrame.GetWidth(), scoreboardBotLeftCornerFrame.GetHeight()), Color.White); spriteBatch.End(); }
public void Draw(SpriteBatch spriteBatch) { int temp = VertWallTile.GetWidth(); //background spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.Opaque, SamplerState.LinearWrap, DepthStencilState.Default, RasterizerState.CullNone); spriteBatch.Draw(background.texture, Vector2.Zero, new Rectangle(0, 0, GameController.ScreenWidth, GameController.ScreenHeight), Color.White, 0, Vector2.Zero, GameController.scale, SpriteEffects.None, 0); spriteBatch.End(); // bottom wall spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.Opaque, SamplerState.LinearWrap, DepthStencilState.Default, RasterizerState.CullNone); spriteBatch.Draw(HorWallTile.texture, new Vector2(HorWallTile.GetWidth(), GameController.ScreenHeight - HorWallTile.GetHeight()), new Rectangle(0, 0, GameController.ScreenWidth - HorWallTile.GetWidth() * 2, HorWallTile.GetHeight()), Color.White, 0, Vector2.Zero, GameController.scale, SpriteEffects.None, 0); spriteBatch.End(); //left wall spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.Opaque, SamplerState.LinearWrap, DepthStencilState.Default, RasterizerState.CullNone); spriteBatch.Draw(VertWallTile.texture, new Vector2(0, _game.scoreBoard.scoreboardHeight), new Rectangle(0, 0, VertWallTile.texture.Width, GameController.ScreenHeight - _game.scoreBoard.scoreboardHeight - cornerWallBlock.GetHeight()), Color.White, 0, Vector2.Zero, GameController.scale, SpriteEffects.None, 0); spriteBatch.End(); //right wall spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.Opaque, SamplerState.LinearWrap, DepthStencilState.Default, RasterizerState.CullNone); spriteBatch.Draw(VertWallTile.texture, new Vector2(GameController.ScreenWidth - VertWallTile.GetWidth(), _game.scoreBoard.scoreboardHeight), new Rectangle(0, 0, VertWallTile.texture.Width, GameController.ScreenHeight - _game.scoreBoard.scoreboardHeight - cornerWallBlock.GetHeight()), Color.White, 0, Vector2.Zero, GameController.scale, SpriteEffects.None, 0); spriteBatch.End(); // corner blocks spriteBatch.Begin(); spriteBatch.Draw(cornerWallBlock.texture, new Rectangle(0, GameController.ScreenHeight - cornerWallBlock.GetHeight(), cornerWallBlock.GetWidth(), cornerWallBlock.GetHeight()), Color.White); spriteBatch.Draw(cornerWallBlock.texture, new Rectangle(GameController.ScreenWidth - cornerWallBlock.GetWidth(), GameController.ScreenHeight - cornerWallBlock.GetHeight(), cornerWallBlock.GetWidth(), cornerWallBlock.GetHeight()), Color.White); spriteBatch.End(); }
private void DrawIcons(SpriteBatch spriteBatch) { spriteBatch.Begin(); //Bomb Icon spriteBatch.Draw(bomb.texture, new Rectangle( GameController.ScreenWidth - scoreboardRightConnectorFrame.GetWidth() - (int)(GameController.ScreenWidth * 0.17) - 3, (int)(scoreboardHeight * 0.1), bomb.GetWidth(), bomb.GetHeight()), Color.White); //Arrow Icon spriteBatch.Draw(arrow.texture, new Rectangle( GameController.ScreenWidth - scoreboardRightConnectorFrame.GetWidth() - (int)(GameController.ScreenWidth * 0.17) - 3, (int)(scoreboardHeight * 0.4 - 2), arrow.GetWidth(), arrow.GetHeight()), Color.White); //Rupee Icon spriteBatch.Draw(rupee.texture, new Rectangle( GameController.ScreenWidth - scoreboardRightConnectorFrame.GetWidth() - (int)(GameController.ScreenWidth * 0.17), (int)(scoreboardHeight * 0.7), rupee.GetWidth(), rupee.GetHeight()), Color.White); //Heart1 Icon spriteBatch.Draw((_game.link.LifeCount > 0 ? heart.texture : heartEmpty.texture), new Rectangle( (GameController.ScreenWidth / 2) - (int)((heart.GetWidth() * 1.5f) + 5) - heart.GetWidth(), (int)(scoreboardHeight * 0.5) - (heart.GetHeight() / 2), heart.GetWidth(), heart.GetHeight()), Color.White); //Heart3 Icon spriteBatch.Draw((_game.link.LifeCount > 2 ? heart.texture : heartEmpty.texture), new Rectangle( (GameController.ScreenWidth / 2) + (int)((heart.GetWidth() * 1.5f) + 5) - heart.GetWidth(), (int)(scoreboardHeight * 0.5) - (heart.GetHeight() / 2), heart.GetWidth(), heart.GetHeight()), Color.White); //Heart2 Icon spriteBatch.Draw((_game.link.LifeCount > 1 ? heart.texture : heartEmpty.texture), new Rectangle( (GameController.ScreenWidth / 2) - heart.GetWidth(), (int)(scoreboardHeight * 0.5) - (heart.GetHeight() / 2), heart.GetWidth(), heart.GetHeight()), Color.White); spriteBatch.End(); }
private void DrawText(SpriteBatch spriteBatch) { spriteBatch.Begin(); //Life Text spriteBatch.DrawString(font, "-Life-", new Vector2((GameController.ScreenWidth / 2) - 53, -5), Color.White); //Bomb Count Text spriteBatch.DrawString(fontSmaller, "x " + _game.link.BombCount.ToString("D3"), new Vector2(GameController.ScreenWidth - 85, -6), Color.White); //Arrow Count Text spriteBatch.DrawString(fontSmaller, "x " + _game.link.ArrowCount.ToString("D3"), new Vector2(GameController.ScreenWidth - 85, 30), Color.White); //Rupee Count Text spriteBatch.DrawString(fontSmaller, "x " + _game.link.RupeeCount.ToString("D3"), new Vector2(GameController.ScreenWidth - 85, 65), Color.White); //Music ON/OFF Text spriteBatch.DrawString(fontSmaller, "Music: " + (GameController.MusicOn ? "ON" : "OFF"), new Vector2(scoreboardLeftConnectorFrame.GetWidth() + 5, (int)(scoreboardHeight * 0.10)), Color.White); //Sound ON/OFF Text spriteBatch.DrawString(fontSmaller, "Sound: " + (GameController.SoundOn ? "ON" : "OFF"), new Vector2(scoreboardLeftConnectorFrame.GetWidth() + 5, (int)(scoreboardHeight * 0.45)), Color.White); spriteBatch.End(); }