- [CHG] Si emntres bota toca techo, comença a caure
- [NEW] L'aigua puja i baixa water-like
This commit is contained in:
@@ -9,6 +9,7 @@ game = {
|
||||
|
||||
light_strobe_value = 0,
|
||||
light_strobe_dir = 1,
|
||||
water_counter = 0,
|
||||
|
||||
enable = function()
|
||||
if game.back_buf == 0 then
|
||||
@@ -21,6 +22,9 @@ game = {
|
||||
end,
|
||||
|
||||
update = function()
|
||||
game.water_counter = game.water_counter + 0.05
|
||||
local counter = game.water_counter
|
||||
|
||||
view.origin(0,0)
|
||||
surf.target(game.back_buf)
|
||||
view.clip()
|
||||
@@ -36,8 +40,9 @@ game = {
|
||||
if rooms.pos.y == 84 then
|
||||
surf.target(game.back_buf)
|
||||
surf.source(game.back_buf)
|
||||
for y=96,103 do
|
||||
for x=0,159 do
|
||||
for x=0,159 do
|
||||
local water_level = math.sin(counter)*2
|
||||
for y=96+water_level,103 do
|
||||
local pixel = surf.pixel(x,y)
|
||||
surf.pixel(x,y,game.water_pal[pixel+1])
|
||||
end
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -235,6 +235,8 @@ sprites = {
|
||||
else
|
||||
if sprites.hero.jumping > 1 then sprites.hero.pos.y = sprites.hero.pos.y - 1 end
|
||||
end
|
||||
else
|
||||
sprites.hero.jumping = 0
|
||||
end
|
||||
sprites.hero.jumping = sprites.hero.jumping - 1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user