add rock-y ground tiles
GitOrigin-RevId: fd490a5a2c57d3e4c141a8690393f56224f4a46e
This commit is contained in:
parent
9ed2021039
commit
3af02981c4
@ -109,10 +109,15 @@ namespace Jumpy {
|
|||||||
|
|
||||||
// Draw foreground tiles.
|
// Draw foreground tiles.
|
||||||
int size = 16;
|
int size = 16;
|
||||||
Rectangle textureSource = new Rectangle(3 * size, 0 * size, size, size);
|
|
||||||
for (int i = 0; i < Camera.Width / size; i++) {
|
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);
|
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.
|
// Aaaaand we're done.
|
||||||
|
@ -16,7 +16,7 @@ namespace Jumpy {
|
|||||||
private const int moveSpeed = 200;
|
private const int moveSpeed = 200;
|
||||||
private const int jumpSpeed = 600;
|
private const int jumpSpeed = 600;
|
||||||
private const int gravity = 2000;
|
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 Point position = new Point(Camera.Width / 2, groundLevel);
|
||||||
private Facing facing = Facing.Right;
|
private Facing facing = Facing.Right;
|
||||||
|
Loading…
Reference in New Issue
Block a user