diff --git a/Blocktest/Code/Blocks/WhiteSand.cs b/Blocktest/Code/Blocks/WhiteSand.cs new file mode 100644 index 0000000..85eeb1e --- /dev/null +++ b/Blocktest/Code/Blocks/WhiteSand.cs @@ -0,0 +1,13 @@ +namespace Blocktest.Blocks +{ + public class WhiteSand : Block + { + public override void Initialize() + { + blockName = "White Sand"; + blockID = 16; + blockSmoothing = true; + base.Initialize(); + } + } +} \ No newline at end of file diff --git a/Blocktest/Code/Scenes/GameScene.cs b/Blocktest/Code/Scenes/GameScene.cs index fc80263..d880251 100644 --- a/Blocktest/Code/Scenes/GameScene.cs +++ b/Blocktest/Code/Scenes/GameScene.cs @@ -81,6 +81,13 @@ public void Draw(GameTime gameTime, GraphicsDevice graphicsDevice) { _spriteBatch.Begin(); Globals.BackgroundTilemap.Draw(_spriteBatch); Globals.ForegroundTilemap.Draw(_spriteBatch); + // placement preview + if (buildMode) + _spriteBatch.Draw(BlockManager.AllBlocks[blockSelected].blockSprite.Texture, + new Vector2Int(Mouse.GetState().X - (Mouse.GetState().X % 8), + (Mouse.GetState().Y - Mouse.GetState().Y % 8)), + new Rectangle(1, 1, 10, 10), Color.DimGray); + _spriteBatch.End(); } diff --git a/Blocktest/Content/Graphics/Blocks/whitesand.png b/Blocktest/Content/Graphics/Blocks/whitesand.png new file mode 100644 index 0000000..c629cc2 Binary files /dev/null and b/Blocktest/Content/Graphics/Blocks/whitesand.png differ