animation1.lua 501 B

12345678910111213141516171819202122232425262728293031
  1. return {
  2. imageSrc = "sprites/sprite_sheet.png",
  3. defaultState = "running",
  4. states = {
  5. running = {
  6. frameCount = 3,
  7. offsetY = 0,
  8. frameW = 100,
  9. frameH = 90,
  10. nextState = "running",
  11. switchDelay = 0.1
  12. },
  13. jumpStart = {
  14. frameCount = 3,
  15. offsetY = 100,
  16. frameW = 100,
  17. frameH = 90,
  18. nextState = "jumpEnd",
  19. switchDelay = 0.16
  20. },
  21. jumpEnd = {
  22. frameCount = 3,
  23. offsetY = 200,
  24. frameW = 100,
  25. frameH = 90,
  26. nextState = "running",
  27. switchDelay = 0.1
  28. }
  29. }
  30. }