Open kthakore opened 13 years ago
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.
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.