anchor the background images at the top
GitOrigin-RevId: caa4dc0ec3c84ea94dde51aef6f584fbd70ba45b
This commit is contained in:
parent
d3283a64c0
commit
010424f43f
@ -116,11 +116,11 @@ namespace Jumpy {
|
|||||||
|
|
||||||
// Draw background.
|
// Draw background.
|
||||||
Rectangle bgSource = new Rectangle(
|
Rectangle bgSource = new Rectangle(
|
||||||
(int) (camera.Left * 0.25), grasslandBg1.Height - camera.Height, camera.Width, camera.Height);
|
(int) (camera.Left * 0.25), 0, camera.Width, camera.Height);
|
||||||
Rectangle bgTarget = new Rectangle(0, 0, camera.Width, camera.Height);
|
Rectangle bgTarget = new Rectangle(0, 0, camera.Width, camera.Height);
|
||||||
spriteBatch.Draw(grasslandBg2, bgTarget, bgSource, Color.White);
|
spriteBatch.Draw(grasslandBg2, bgTarget, bgSource, Color.White);
|
||||||
bgSource = new Rectangle(
|
bgSource = new Rectangle(
|
||||||
(int) (camera.Left * 0.5), grasslandBg1.Height - camera.Height, camera.Width, camera.Height);
|
(int) (camera.Left * 0.5), 0, camera.Width, camera.Height);
|
||||||
spriteBatch.Draw(grasslandBg1, bgTarget, bgSource, Color.White);
|
spriteBatch.Draw(grasslandBg1, bgTarget, bgSource, Color.White);
|
||||||
|
|
||||||
// Draw player.
|
// Draw player.
|
||||||
|
Loading…
Reference in New Issue
Block a user