From 5b3b0b3f6a81603b1d677cbe6c04ea3bc5e0060b Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Fri, 15 May 2026 18:06:22 +0200 Subject: [PATCH] DX: sfx de respawn i color de parpadeig d'invulnerabilitat configurable --- config.lua | 1 + pepe_runner_dx.lua | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config.lua b/config.lua index f556eed..9a83c85 100644 --- a/config.lua +++ b/config.lua @@ -40,6 +40,7 @@ skin = "native" -- colors.escala = COLOR_LIGHT_CYAN -- ═ escales -- colors.corda = COLOR_LIGHT_GRAY -- ─ cordes -- colors.pepe = COLOR_WHITE -- el protagonista +-- colors.pepe_invuln = COLOR_LIGHT_GREEN -- parpadeig en invulnerabilitat -- colors.malo = COLOR_LIGHT_RED -- enemics -- colors.malo_carrega = COLOR_LIGHT_MAGENTA -- enemic portant diners -- colors.hud_text = COLOR_WHITE -- text del rotul inferior diff --git a/pepe_runner_dx.lua b/pepe_runner_dx.lua index a934340..123d960 100644 --- a/pepe_runner_dx.lua +++ b/pepe_runner_dx.lua @@ -76,6 +76,7 @@ colors = { escala = COLOR_LIGHT_CYAN, corda = COLOR_LIGHT_GRAY, pepe = COLOR_WHITE, + pepe_invuln = COLOR_LIGHT_GREEN, -- parpadeig de Pepe quan es invulnerable malo = COLOR_LIGHT_RED, malo_carrega = COLOR_LIGHT_MAGENTA, -- enemic portant diners hud_text = COLOR_WHITE, @@ -277,6 +278,8 @@ end -- ==================================================================== function sfx_coin() sound(2000, 40) end function sfx_escala_step(y) sound(400 + y * 40, 4) end +-- "uic uic uic..." quatre pulsos aguts amb volum decreixent, com un eco +function sfx_respawn() play("o6v9c0r0v6c0r0v3c0r0v1c0") end function sfx_dig() play("l0o2c") end function sfx_die() play("l1o4cl0o3bagfed") end function sfx_malo_die() play("l0o3ao4c") end @@ -362,8 +365,11 @@ function pintar_pepe() col = ((fase - tram_curt) % 12 < 6) and colors.malo or colors.bg end elseif pepe.invuln_t > 0 then - -- Invulnerabilitat: parpadeja entre blanc i groc cada 6 frames. - col = (pepe.invuln_t % 12 < 6) and colors.pepe or colors.diners + -- Invulnerabilitat: parpadeja entre colors.pepe i colors.pepe_invuln + -- cada 6 frames. Es vol un color brillant per a que no quede estela + -- visual al moure's (negre o foscos donen la sensacio que la silueta + -- blanca persisteix en la retina). + col = (pepe.invuln_t % 12 < 6) and colors.pepe or colors.pepe_invuln end color(col, colors.bg) @@ -471,6 +477,7 @@ function respawn_pepe() pepe.y = 23 pepe.estat = NORMAL pepe.invuln_t = temps.invuln_frames + sfx_respawn() end -- Inicialitza tot per a una nova partida (reset complet)