Palette Swapper Constructor - #145
Open
Kamsted wants to merge 2 commits into
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to create Palette Swappers as constructors not unlike the Animators that already exist in the Framework. THIS DOES NOT OVERWRITE THE ABILITY TO SIMPLY USE THE palette_swap function but adds an option to create and use them as constructors for more control over the process. How the Palette Swapper is set-up is not too different than the Animator:
The Palette Swappers can have multiple palettes assigned to them like the Animators. You can create a Palette Swapper by using new palette_swapper_create(), and add any number of palettes with palette_add() and giving them unique IDs.
A palette can start playing by using palette_start() and the desired palette's ID.
Palettes can now be used by calling palette_swapper_draw() in any Draw event right before whatever needs to be palette swapped is drawn inside the event.
The previous simple palette_swap() function STILL EXISTS and is perfectly usable, but the constructor helps with more complex palette related algorithms.