- [NEW] El mono

- [NEW] Noves animacions de detallets
- [NEW] Més particles i eye candy
- [FIX] Si es ficava un item/enemic en la fila de baix del tot no es guardaba
- [FIX] Quan se disaparaba cap a la dreta amb el final de la pantalla o una pared en la esquena, la bala no eixia
- [WIP] Treballant en el marcador
This commit is contained in:
Raimon @ quifisraimon committed 2026-10-06 15:56:37 +02:00
1 parent 1f6fd47b6d
commit d2ebbccbf6
20 files changed
+172 -27

No files matched your search

+26 -17
View File
@@ -1,6 +1,6 @@
score = {
points = 0,
color = 28,
color = 27,
ypos = 3,
surf = nil,
font = nil
@@ -14,21 +14,24 @@ function me.init(reinit)
end
local function draw_text()
font.current(me.font)
font.spacing(0)
local txt = string.format("%03d", me.points)
-- draw.text(txt,2,me.ypos-1,27)
-- draw.text(txt,3,me.ypos-1,27)
-- draw.text(txt,4,me.ypos-1,27)
-- draw.text(txt,2,me.ypos,27)
-- draw.text(txt,4,me.ypos,27)
-- draw.text(txt,2,me.ypos+1,27)
-- draw.text(txt,4,me.ypos+1,27)
-- draw.text(txt,2,me.ypos+2,27)
-- draw.text(txt,3,me.ypos+2,27)
-- draw.text(txt,4,me.ypos+2,27)
draw.text(txt,3,me.ypos+1,1)
draw.text(txt,3,me.ypos,me.color)
draw.text(txt,10,me.ypos,me.color)
-- font.current(me.font)
-- font.spacing(0)
-- draw.text(txt,2,me.ypos+2,1)
-- draw.text(txt,3,me.ypos+2,1)
-- draw.text(txt,4,me.ypos+2,1)
-- draw.text(txt,2,me.ypos-1,26)
-- draw.text(txt,3,me.ypos-1,26)
-- draw.text(txt,4,me.ypos-1,26)
-- draw.text(txt,2,me.ypos,26)
-- draw.text(txt,4,me.ypos,26)
-- draw.text(txt,2,me.ypos+1,26)
-- draw.text(txt,4,me.ypos+1,26)
---- draw.text(txt,3,me.ypos+1,1)
-- draw.text(txt,3,me.ypos,me.color)
font.current(font.DEFAULT)
font.spacing(1)
surf.source(me.surf)
@@ -46,24 +49,30 @@ local function draw_key(sx,sy,dx,dy)
end
function me.draw()
local paleta = palfade.get()
palfade.restore()
if sprites.hero.state == templates.DEAD then
if me.ypos > -100 then me.ypos=me.ypos-1 end
end
view.origin(0,0)
surf.target(0)
surf.clip()
draw_text()
draw.surf(0,40,8,8, 1,1)
local y = score.ypos
if sprites.hero.keys["verda"] then draw_key(16,48,140,y) y=y+8 end
if sprites.hero.keys["groga"] then draw_key(16,56,140,y) y=y+8 end
if sprites.hero.keys["roja"] then draw_key(32,48,140,y) y=y+8 end
if sprites.hero.keys["blava"] then draw_key(32,56,140,y) y=y+8 end
palfade.set(paleta)
end
function me.inc(value)
me.points = me.points + value
tweening.add(8, 0, 0.5, easing.linear, function(val,progress,finished) me.color = (math.floor(val)&1) == 0 and 28 or 14 end)
tweening.add(8, 0, 0.5, easing.linear, function(val,progress,finished) me.color = (math.floor(val)&1) == 0 and 27 or 14 end)
tweening.add(5, 3, 0.5, easing.easeOutElastic, function(val,progress,finished) me.ypos = math.floor(val) end)
end