- [CHG] Si emntres bota toca techo, comença a caure

- [NEW] L'aigua puja i baixa water-like
This commit is contained in:
2026-02-23 20:05:35 +01:00
parent 9cb98203ee
commit c5dd0344c0
4 changed files with 9 additions and 2 deletions

View File

@@ -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