- [NEW] El marcador s'amaga quan mors
- [NEW] Al morir i apagar-se tot, les llums s'encenen de cero a normal de nou al reviure
This commit is contained in:
@@ -6,8 +6,9 @@ score = {
|
||||
font = nil
|
||||
} local me = score
|
||||
|
||||
function me.init()
|
||||
me.points = 0
|
||||
function me.init(reinit)
|
||||
if not reinit then me.points = 0 end
|
||||
me.ypos = 3
|
||||
me.surf = surf.load("gfx/sprites.gif")
|
||||
me.font = font.load("gfx/score_font.fnt")
|
||||
end
|
||||
@@ -45,13 +46,16 @@ local function draw_key(sx,sy,dx,dy)
|
||||
end
|
||||
|
||||
function me.draw()
|
||||
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)
|
||||
view.clip()
|
||||
|
||||
draw_text()
|
||||
|
||||
local y = 3
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user