Remove old Leaf Ranger code from main
This commit is contained in:
parent
999d1b41c1
commit
7c06d99d27
18
main.lua
18
main.lua
|
@ -30,24 +30,6 @@ function love.load()
|
||||||
|
|
||||||
BlockyFont = Font(blockyFont, 8, 8, blockFontChars)
|
BlockyFont = Font(blockyFont, 8, 8, blockFontChars)
|
||||||
|
|
||||||
local leafRangerSprites = love.graphics.newImage("assets/leaf-ranger.png")
|
|
||||||
local leafRangerAtlas = Atlas(leafRangerSprites, 288, 128)
|
|
||||||
|
|
||||||
local function sprites(row, len, on_finish, next)
|
|
||||||
local start = (row - 1) * 22 + 1
|
|
||||||
local anim = Animation:new_spanned(leafRangerAtlas, start, start + len - 1)
|
|
||||||
return { animation = anim, on_finish = on_finish, next = next }
|
|
||||||
end
|
|
||||||
|
|
||||||
local states = {
|
|
||||||
idle = sprites(1, 12),
|
|
||||||
run = sprites(2, 10),
|
|
||||||
hurt = sprites(16, 6, "goto", "idle"),
|
|
||||||
death = sprites(17, 19, "stop"),
|
|
||||||
}
|
|
||||||
|
|
||||||
LeafRanger = Animator(states, "idle")
|
|
||||||
|
|
||||||
local options = {}
|
local options = {}
|
||||||
|
|
||||||
for idx, unit in ipairs(Units) do
|
for idx, unit in ipairs(Units) do
|
||||||
|
|
Loading…
Reference in New Issue