144 lines
2.5 KiB
Lua
144 lines
2.5 KiB
Lua
|
-- animationsç
|
||
|
-- all these are linear animations, maybe in the future make proper animations?
|
||
|
animation = {
|
||
|
cursed_book = {
|
||
|
attack_loop = {
|
||
|
path = "assets/entities/cursed_book/attack_loop",
|
||
|
frames = 1,
|
||
|
speed = 0
|
||
|
},
|
||
|
attack_transition = {
|
||
|
path = "assets/entities/cursed_book/attack_transition",
|
||
|
frames = 5,
|
||
|
speed = 1/16
|
||
|
},
|
||
|
flying = {
|
||
|
path = "assets/entities/cursed_book/flying",
|
||
|
frames = 11,
|
||
|
speed = 1/16
|
||
|
},
|
||
|
spawn = {
|
||
|
path = "assets/entities/cursed_book/spawn",
|
||
|
frames = 5,
|
||
|
speed = 0
|
||
|
}
|
||
|
},
|
||
|
particle = {
|
||
|
simple = {
|
||
|
path = "assets/entities/particle/simple",
|
||
|
frames = 4,
|
||
|
speed = 1/4
|
||
|
}
|
||
|
},
|
||
|
fairy = {
|
||
|
flying = {
|
||
|
path = "assets/entities/fairy/flying",
|
||
|
frames = 2,
|
||
|
speed = 1/30
|
||
|
}
|
||
|
},
|
||
|
decoration = {
|
||
|
candelabra = {
|
||
|
path = "assets/entities/decoration/candelabra",
|
||
|
frames = 8,
|
||
|
speed = 1/6
|
||
|
}
|
||
|
},
|
||
|
kupo = {
|
||
|
body = {
|
||
|
path = "assets/entities/kupo/kupo",
|
||
|
frames = 4,
|
||
|
speed = 1/8
|
||
|
},
|
||
|
bow = {
|
||
|
path = "assets/entities/kupo/kupo_bow",
|
||
|
frames = 6,
|
||
|
speed = 1/10
|
||
|
},
|
||
|
arrow = {
|
||
|
path = "assets/entities/kupo/kupo_arrow",
|
||
|
frames = 1,
|
||
|
speed = 0
|
||
|
}
|
||
|
},
|
||
|
moth_mask = {
|
||
|
idle = {
|
||
|
path = "assets/entities/nancy/moth_mask/idle",
|
||
|
frames = 4,
|
||
|
speed = 1/8
|
||
|
},
|
||
|
run = {
|
||
|
path = "assets/entities/nancy/moth_mask/run",
|
||
|
frames = 6,
|
||
|
speed = 1/8
|
||
|
},
|
||
|
fall = {
|
||
|
path = "assets/entities/nancy/moth_mask/fall",
|
||
|
frames = 3,
|
||
|
speed = 1/8
|
||
|
},
|
||
|
jump = {
|
||
|
path = "assets/entities/nancy/moth_mask/jump",
|
||
|
frames = 3,
|
||
|
speed = 1/8
|
||
|
}
|
||
|
},
|
||
|
nancy = {
|
||
|
idle = {
|
||
|
path = "assets/entities/nancy/idle",
|
||
|
frames = 4,
|
||
|
speed = 1/8
|
||
|
},
|
||
|
run = {
|
||
|
path = "assets/entities/nancy/run",
|
||
|
frames = 6,
|
||
|
speed = 1/8
|
||
|
},
|
||
|
fall = {
|
||
|
path = "assets/entities/nancy/fall",
|
||
|
frames = 3,
|
||
|
speed = 1/8
|
||
|
},
|
||
|
jump = {
|
||
|
path = "assets/entities/nancy/jump",
|
||
|
frames = 3,
|
||
|
speed = 1/8
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-- animation loader
|
||
|
-- im unsure if this is too memory expensive (probably)
|
||
|
-- this should go elsewhere, maybe
|
||
|
for _, object in pairs(animation) do
|
||
|
for _, anim in pairs(object) do
|
||
|
anim.imgs = {}
|
||
|
for i = 1, anim.frames do
|
||
|
table.insert(anim.imgs,love.graphics.newImage(anim.path..tostring(i)..".png"))
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
levelProperties = {
|
||
|
pos = {
|
||
|
x = 0,
|
||
|
y = 0
|
||
|
},
|
||
|
-- im unsure why there's offset at all, here
|
||
|
offset = {
|
||
|
x = 0,
|
||
|
y = 0
|
||
|
}
|
||
|
}
|
||
|
|
||
|
tileset = {
|
||
|
bricks = love.graphics.newImage("assets/tileset/bricks.png"),
|
||
|
library = love.graphics.newImage("assets/tileset/library.png")
|
||
|
}
|
||
|
|
||
|
tileProperties = {
|
||
|
width = 16,
|
||
|
height = 16,
|
||
|
scale = 1,
|
||
|
}
|