hey guys,
english isn't my first language and im not a proffesional in java so
please correct me if im wrong at something.
my problem:
If you have a sprite of type AdvanceSprite with a animationframe which is
longer than the getImages() array, and you use a subclass of
PreciseCollisionGroup or lower to check collisions, you will get a
IndexOutOfBounds exeption in case of a collision.
Found out why: In the isCollided method, the method getImage() is invoked.
This is the one in AnimatedSprite. It returns the image at the index equal
to getFrame() in the imagearray so when getFrame() > getImages().length
the exeption is thrown and getFrame() will be so when you want to repeat a
image in your animation.
This is a bug because its impossible to repeat images in a animation more
than 1 time because of it, even while this is the case in the example
given in the description of isCollided.
i found a work around by chanceing the imagefile I use for the animation
but you guys might want to check it out. if it mended to be so, please
explain it to me what im doing wrong.
greetings, peter
ps: uploading .java files of my game on demand if you want.
Original issue reported on code.google.com by peter_bo...@msn.com on 5 Oct 2009 at 7:57
Original issue reported on code.google.com by
peter_bo...@msn.com
on 5 Oct 2009 at 7:57