mirror of
https://github.com/libretro/lutro-platformer.git
synced 2024-11-23 16:19:46 +00:00
3 layers paralax
This commit is contained in:
parent
aeb5f11cec
commit
a05ba0aea0
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
BIN
assets/forestbackground0.png
Normal file
BIN
assets/forestbackground0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
assets/forestbackground1.png
Normal file
BIN
assets/forestbackground1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
BIN
assets/forestbackground2.png
Normal file
BIN
assets/forestbackground2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.5 KiB |
10
main.lua
10
main.lua
@ -55,8 +55,9 @@ function lutro.load()
|
||||
gold = 0
|
||||
hp = 3
|
||||
lutro.graphics.setBackgroundColor(0, 0, 0)
|
||||
bg1 = lutro.graphics.newImage("assets/forestbackground.png")
|
||||
bg2 = lutro.graphics.newImage("assets/foresttrees.png")
|
||||
bg0 = lutro.graphics.newImage("assets/forestbackground0.png")
|
||||
bg1 = lutro.graphics.newImage("assets/forestbackground1.png")
|
||||
bg2 = lutro.graphics.newImage("assets/forestbackground2.png")
|
||||
--font = lutro.graphics.newImageFont("assets/font.png",
|
||||
-- " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/")
|
||||
barfont = lutro.graphics.newImageFont("assets/barfont.png",
|
||||
@ -124,8 +125,9 @@ function lutro.draw()
|
||||
lutro.graphics.clear()
|
||||
|
||||
for i=0, 4 do
|
||||
lutro.graphics.draw(bg1, i*bg1:getWidth() + camera_x / 6, 0)
|
||||
--lutro.graphics.draw(bg2, i*bg2:getWidth() + camera_x / 3, 0)
|
||||
lutro.graphics.draw(bg2, i*bg2:getWidth() + camera_x / 8, 0)
|
||||
lutro.graphics.draw(bg1, i*bg1:getWidth() + camera_x / 4, 0)
|
||||
lutro.graphics.draw(bg0, i*bg0:getWidth() + camera_x / 2, 0)
|
||||
end
|
||||
|
||||
lutro.graphics.push()
|
||||
|
Loading…
Reference in New Issue
Block a user