0
I just learned programming with Corona SDK. Recently I have a problem in animate the object. I have seen all the instructions about animation in corona and I saw it just present about how to make animation for object with a single image( they use one image to make the object have two or more animation) https://www.youtube.com/watch?v=VsA2agBAWho&t=322s .
I have followed suit and the problem begin when I find the asset on the Internet, the link here: https://finalbossblues.itch.io/pixel-platformer-pack?download . As you can see, the folder have multiple image for multiple animation. I have no idea and no reference to animate all the animation for my player by multiple image( but I can do that with a single image).
I have found all the way to solve them on the Internet but there no result suitable for me. :((
As the result, i have a dump and poor code:
–
– main.lua
– My code here
local sheetData = {
width = 30,
height = 44,
numFrames = 6,
sheetContentWidth = 181,
sheetContentHeight = 44 }
local mySheet = graphics.newImageSheet( “walk.png”, sheetData )
local sequenceData = {
{ name = “normalrun”, start = 1, count = 6, time = 800 }
}
local animation = display.newSprite( mySheet, sequenceData )
animation.x=150
animation.y= 300
animation:play()
just make 1 animation :((
And now, I just have two ways to choose. One is use some method to animate multiple animation by multiple image ( You will help me in this side, I really need your help!). Two is combine all image to one :)) ( look so cheat ).
Thank you a lot to help me and so sorry because my English is not good, I am Vietnamese I use GG Translate. This is my first step in game development and I dont want to be defeated. I want to integrated all animation into my player( like walk, jump, attack…) and call it to use when I want ( with multiple Image). Please sympathize with me because I was asking so stupid.
Thanks you so much. Hope there will be a way to help me :)) It will be more good if you show me the example.