added draw functions for setScale, rehandled scale, animations now have multiple frame times (this breaks some minor stuff)

This commit is contained in:
lustlion
2022-02-24 04:15:35 +01:00
parent 00cec59351
commit 54f6a46428
19 changed files with 139 additions and 53 deletions

View File

@@ -5,118 +5,194 @@ animation = {}
animation.cursed_book = {}
animation.cursed_book.attack_loop = {
path = "assets/entities/cursed_book/attack_loop",
frames = 1,
speed = 0
frames = {
0
}
}
animation.cursed_book.attack_transition = {
path = "assets/entities/cursed_book/attack_transition",
frames = 5,
speed = 1/16
frames = {
1/16,
1/16,
1/16,
1/16,
1/16
}
}
animation.cursed_book.flying = {
path = "assets/entities/cursed_book/flying",
frames = 11,
speed = 1/16
frames = {
2/16,
2/16,
1/16,
1/16,
1/16,
1/16,
1/16,
2/16
}
}
animation.cursed_book.spawn = {
path = "assets/entities/cursed_book/spawn",
frames = 5,
speed = 0
frames = {
0,
0,
0,
0,
0
}
}
-- particles
animation.particle = {}
animation.particle.simple = {
path = "assets/entities/particle/simple",
frames = 4,
speed = 1/4
frames = {
1/4,
1/4,
1/4,
1/4
}
}
-- fairy
animation.fairy = {}
animation.fairy.flying = {
path = "assets/entities/fairy/flying",
frames = 2,
speed = 1/30
frames = {
1/32,
1/32
}
}
-- decoration
animation.decoration = {}
animation.decoration.candelabra = {
path = "assets/entities/decoration/candelabra",
frames = 8,
speed = 1/6
frames = {
1/8,
1/8,
1/8,
1/8,
1/8,
1/8,
1/8,
1/8
}
}
-- kupo
animation.kupo = {}
animation.kupo.body = {
path = "assets/entities/kupo/kupo",
frames = 4,
speed = 1/8
frames = {
1/8,
1/8,
1/8,
1/8
}
}
animation.kupo.bow = {
path = "assets/entities/kupo/kupo_bow",
frames = 6,
speed = 1/10
frames = {
1/10,
1/10,
1/10,
1/10,
1/10,
1/10
}
}
animation.kupo.arrow = {
path = "assets/entities/kupo/kupo_arrow",
frames = 1,
speed = 0
frames = {
0
}
}
-- moth mask
animation.moth_mask = {}
animation.moth_mask.idle = {
path = "assets/entities/nancy/moth_mask/idle",
frames = 4,
speed = 1/8
frames = {
1/8,
1/8,
1/8,
1/8
}
}
animation.moth_mask.run = {
path = "assets/entities/nancy/moth_mask/run",
frames = 6,
speed = 1/8
frames = {
1/8,
1/8,
1/8,
1/8,
1/8,
1/8
}
}
animation.moth_mask.fall = {
path = "assets/entities/nancy/moth_mask/fall",
frames = 3,
speed = 1/8
frames = {
1/8,
1/8,
1/8
}
}
animation.moth_mask.jump = {
path = "assets/entities/nancy/moth_mask/jump",
frames = 3,
speed = 1/8
frames = {
1/8,
1/8,
1/8
}
}
-- nancy
animation.nancy = {}
animation.nancy.idle = {
path = "assets/entities/nancy/idle",
frames = 4,
speed = 1/8
frames = {
1/8,
1/8,
1/8,
1/8
}
}
animation.nancy.run = {
path = "assets/entities/nancy/run",
frames = 6,
speed = 1/8
frames = {
1/8,
1/8,
1/8,
1/8,
1/8,
1/8
}
}
animation.nancy.fall = {
path = "assets/entities/nancy/fall",
frames = 3,
speed = 1/8
frames = {
1/8,
1/8,
1/8
}
}
animation.nancy.jump = {
path = "assets/entities/nancy/jump",
frames = 3,
speed = 1/8
frames = {
1/8,
1/8,
1/8
}
}
-- animation initializer
for _, object in pairs(animation) do
for _, anim in pairs(object) do
anim.imgs = {}
for i = 1, anim.frames do
for i = 1, #anim.frames do
table.insert(anim.imgs,love.graphics.newImage(anim.path..tostring(i)..".png"))
end
end