israelCanul / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Bug in DrawableObject.animate(int[] animationTiles... #124

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Call the function with an array of length X.
2. Call the function again with an array of length Y, smaller than X.
-> if the current animation frame index (in the custom array) was higher than 
Y, you'll get an index out of bounds exception when the engine tries to show 
the next frame.

What version of Rokon are you using?

Trunk r357.

Please provide any additional information below.

The problem is caused by the fact that new calls to animate(int[] 
animationTiles...) don't reset the animationCustomPosition. The solution is to 
add this to the function:

animationCustomPosition = -1;

Original issue reported on code.google.com by necrotic...@gmail.com on 23 Jul 2010 at 10:29

GoogleCodeExporter commented 8 years ago
Thanks, sorted

Original comment by rtaylor205@gmail.com on 25 Jul 2010 at 9:11