diff --git a/sprite.lua b/sprite.lua index 12d4d27..0e6bda4 100644 --- a/sprite.lua +++ b/sprite.lua @@ -78,6 +78,8 @@ sprite.newSprite = function( spriteSet ) s:setSequence( name ) end + s:prepare( "default" ) + return s end @@ -103,9 +105,13 @@ sprite.add = function( spriteSet, sequenceName, startFrame, frameCount, time, lo elseif -2 == loopParam then loopCount = 0 loopDirection = "bounce" + elseif loopParam > 0 then + loopCount = loopParam end end + startFrame = startFrame + spriteSet.startFrame - 1 + local item = { name = sequenceName,