flame-engine / flame

A Flutter based game engine.
https://flame-engine.org
MIT License
9.31k stars 915 forks source link

fix: Set SpriteButtonComponent sprites in `onMount` #3327

Closed spydon closed 1 month ago

spydon commented 1 month ago

Description

Since it will be confusing for the user to have to call super.onLoad last when they override onLoad, we move setting the sprites to onMount.

Checklist

Breaking Change?

Related Issues

spydon commented 1 month ago

@puneet-739 now it should be fixed, I didn't have the time to properly test it last time since I wasn't home, but now I was. If you want to test it you can depend on this branch in your project, or main once it is merged.

puneet-739 commented 1 month ago

@puneet-739 now it should be fixed, I didn't have the time to properly test it last time since I wasn't home, but now I was. If you want to test it you can depend on this branch in your project, or main once it is merged.

@spydon everything is working perfectly now! : )