- [NEW] Cada sprite pot usar el seu propi gif

- [NEW] Monedes
This commit is contained in:
2025-11-16 16:51:47 +01:00
parent b263d989d0
commit e366209f46
11 changed files with 65 additions and 23 deletions

View File

@@ -10,11 +10,12 @@ templates = {
sprite = {
type = type,
pos = options.pos,--{ x=100, y=4*12*8+71 },
size = { w=16,h=17 },
size = { w=16,h=16 },
bbo = { left=3, top=2, right=3, bottom=0 },
current_frame = 1,
current_wait = 1,
flipped = options.flipped,
surf = surf.load("mummy.gif"),
animation = "mummy_walk",
state = templates.ALIVE,
enemy = true,
@@ -30,9 +31,23 @@ templates = {
current_frame = 1,
current_wait = 1,
flipped = options.flipped,
surf = surf.load("morcus.gif"),
animation = "bullet",
ia = sprites.update_bullet
}
elseif type == "coin" then
sprite = {
type = type,
pos = options.pos,--{ x=100, y=4*12*8+71 },
size = { w=8,h=8 },
bbo = { left=0, top=0, right=0, bottom=0 },
current_frame = 1,
current_wait = 1,
flipped = options.flipped,
surf = surf.load("misc.gif"),
animation = "coin",
ia = sprites.update_coin
}
else
error("Template not recognized")
end