add rock-y ground tiles

GitOrigin-RevId: fd490a5a2c57d3e4c141a8690393f56224f4a46e
This commit is contained in:
Colin McMillen 2019-12-10 16:49:27 -05:00
parent 9ed2021039
commit 3af02981c4
2 changed files with 8 additions and 3 deletions

View File

@ -109,10 +109,15 @@ namespace Jumpy {
// Draw foreground tiles.
int size = 16;
Rectangle textureSource = new Rectangle(3 * size, 0 * size, size, size);
for (int i = 0; i < Camera.Width / size; i++) {
Rectangle source = new Rectangle(3 * size, 0 * size, size, size);
Vector2 drawPos = new Vector2(i * size, Camera.Height - size * 2);
spriteBatch.Draw(grassland, drawPos, source, Color.White);
}
for (int i = 0; i < Camera.Width / size; i++) {
Rectangle source = new Rectangle(3 * size, 1 * size, size, size);
Vector2 drawPos = new Vector2(i * size, Camera.Height - size);
spriteBatch.Draw(grassland, drawPos, textureSource, Color.White);
spriteBatch.Draw(grassland, drawPos, source, Color.White);
}
// Aaaaand we're done.

View File

@ -16,7 +16,7 @@ namespace Jumpy {
private const int moveSpeed = 200;
private const int jumpSpeed = 600;
private const int gravity = 2000;
private const int groundLevel = Camera.Height - spriteSize / 2 + bottomPadding - 16;
private const int groundLevel = Camera.Height - spriteSize / 2 + bottomPadding - 32;
private Point position = new Point(Camera.Width / 2, groundLevel);
private Facing facing = Facing.Right;