Repository navigation
New extension: Carousel - #2367
Open
NicolasDemangeat wants to merge 2 commits into
Open
NicolasDemangeat wants to merge 2 commits into
NicolasDemangeat wants to merge 2 commits into
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.
Description
Adds a Carousel behavior that turns a sprite with several animations into a looping, sliding carousel item.
Calling Next or Previous:
Configurable properties (visible directly in the scene editor, per instance):
MinIndex/MaxIndex: the range of animation indexes to cycle through,Loop: wrap around at the ends instead of stopping,SlideDistance: how far the item slides off-screen,Duration: how long each slide takes, in seconds (0.4 by default).The Tween behavior is required and is added automatically when Carousel is added to an object. It also works well with the swipe gesture extension.
This replaces the old submission #2282 (closed when the submission process changed).
How to use it
Put the Carousel behavior on a sprite with multiple animations to build:
Setup:
MinIndexandMaxIndexto match the animations of your object (0-based: the first animation is index 0).Loopif the carousel should wrap around at the ends.Example project
Carousel-example.zip
Checklist
extensions/community/.AI usage