-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlxRandom.getObject() does not respect startIndex #2009
Comments
i guess that the line https://github.com/HaxeFlixel/flixel/blob/dev/flixel/math/FlxRandom.hx#L292 |
Yeah, looks like that change fixes the issue. Thanks! |
@Poobslag can we close this issue then? |
Unit test 😁 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FlxRandom.getObject does not respect the startIndex. If you specify a startIndex of 3, for example, FlxRandom.getObject will still return array items with starting indexes below 3.
Code snippet reproducing the issue:
Observed behavior:
"Have a dxxxyyyyxxxlightful day" is printed, FlxG.random.getObject returns random array items with index [0, 1].
Expected behavior:
"Have a deeeeeeeeeelightful day" should be printed. FlxG.random.getObject should return random array items with index [3, 4].
The text was updated successfully, but these errors were encountered: