SDLx::Sprite::Animated need random start frame #196

Open
kthakore opened this Issue Jul 26, 2011 · 1 comment

Comments

Projects
None yet
2 participants
Owner

kthakore commented Jul 26, 2011

When I set many units on map they all move equally (in lockstep).
Now just one possible code to do that:

after constructor

$anim->next for 0 .. rand 10;

but this is very ugly =(

I think we need add param in constructor: randomize => 1, and/or param/function to set start frame manually.

@ghost ghost assigned kthakore Jul 26, 2011

Owner

jtpalmer commented Jul 30, 2011

I'd like the ability to change the frame manually (not just in the constructor). SDLx::Sprite::Animated::current_frame() returns the frame number, but I'd like to use that method to change the current frame as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment