Hi guys,
I'm trying to make a sprite following an included example with the boat
function my_Sprite:init()
local pack = TexturePack.new("gfx/walk.txt", "gfx/walk.png", true)
self.anim = {
Bitmap.new(pack:getTextureRegion("s0000.png")),
Bitmap.new(pack:getTextureRegion("s0001.png")),
...
yet if I have like 100+ frames in the TextureRegion, it gets kinda dull to manually write every frame. Maybe there's a way to cycle all the frames in walk.txt ?
Thanks
Comments
Bomb={}
for loop=0,3,1 do
Bomb[loop]=textures:getTextureRegion("bomb"..loop..".png")
end
Likes: RogerT
https://deluxepixel.com