add Sprite.LinearFrames
This commit is contained in:
@@ -28,6 +28,18 @@ function Sprite:rate( f )
|
|||||||
self:GetTexture():rate( f );
|
self:GetTexture():rate( f );
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Sprite.LinearFrames(NumFrames, Seconds)
|
||||||
|
local Frames = {};
|
||||||
|
for i = 0,NumFrames-1 do
|
||||||
|
Frames[#Frames+1] = {
|
||||||
|
Frame = i;
|
||||||
|
Delay = (1/NumFrames)*Seconds;
|
||||||
|
};
|
||||||
|
end
|
||||||
|
|
||||||
|
return Frames;
|
||||||
|
end
|
||||||
|
|
||||||
-- (c) 2005 Glenn Maynard
|
-- (c) 2005 Glenn Maynard
|
||||||
-- All rights reserved.
|
-- All rights reserved.
|
||||||
--
|
--
|
||||||
|
|||||||
Reference in New Issue
Block a user