Grab a specific frame from a spritesheet #2331
Answered
by
TaylorAnderson
TaylorAnderson
asked this question in
Q&A
-
Hello! I'm sorry if this is a dumb question, I'm just starting in HaxeFlixel. Is there a way to have the graphic of a sprite just be a frame from a spritesheet? I'm trying to generate some clouds for a background and all the cloud graphics are on one spritesheet, so whenever I spawn a cloud I want to give it a random frame from that sheet. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
TaylorAnderson
Jun 27, 2021
Replies: 1 comment
-
Nvm I found it. Setting sprite.animation.frameIndex did the trick. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
TaylorAnderson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nvm I found it. Setting sprite.animation.frameIndex did the trick.