Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds an autoResize parameter to SpriteGroupComponent which will allow Flame users to control if the size of the component should be re-calculated to fit the size of current active sprite in the group. This new parameter auto-populates when not specified, based value of size while construction. If size is not given, autoResize will be true and vice-versa. Caveat: If someone goes and replaces the actual Sprite at a particular key within SpriteGroupComponent.sprites map and if that key is the current state, it will not trigger an auto-resize. This seems like a very unlikely use-case, so I am not worried about it too much.
- Loading branch information
1 parent
5b5ff30
commit 1576bd8
Showing
2 changed files
with
104 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters