- More cleanup
- Added kupos entity and sprites (body, bow) - Finally understood my code
This commit is contained in:
@@ -1,41 +1,47 @@
|
||||
image = {
|
||||
background = love.graphics.newImage("assets/terrain/background.png"),
|
||||
cartridge = {
|
||||
nancy = love.graphics.newImage("assets/menu/nancy.png")
|
||||
}
|
||||
background = love.graphics.newImage("assets/terrain/background.png")
|
||||
}
|
||||
-- animations
|
||||
animation = {
|
||||
kupo = {
|
||||
body = {
|
||||
path = "assets/characters/kupo/kupo",
|
||||
frames = 4,
|
||||
speed = 1/8
|
||||
},
|
||||
bow = {
|
||||
path = "assets/characters/kupo/kupo_bow",
|
||||
frames = 6,
|
||||
speed = 1/8
|
||||
}
|
||||
},
|
||||
nancy = {
|
||||
idle = {
|
||||
path = "assets/characters/nancy/idle",
|
||||
frames = 4,
|
||||
speed = 1/8,
|
||||
imgs = {}
|
||||
speed = 1/8
|
||||
},
|
||||
run = {
|
||||
path = "assets/characters/nancy/run",
|
||||
frames = 6,
|
||||
speed = 1/8,
|
||||
imgs = {}
|
||||
speed = 1/8
|
||||
},
|
||||
fall = {
|
||||
path = "assets/characters/nancy/fall",
|
||||
frames = 3,
|
||||
speed = 1/8,
|
||||
imgs = {}
|
||||
speed = 1/8
|
||||
},
|
||||
jump = {
|
||||
path = "assets/characters/nancy/jump",
|
||||
frames = 3,
|
||||
speed = 1/8,
|
||||
imgs = {}
|
||||
speed = 1/8
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user