Skip to content

Commit

Permalink
fix: play sequence properly
Browse files Browse the repository at this point in the history
  • Loading branch information
brunomikoski committed Aug 19, 2021
1 parent f3f567e commit 56c59ec
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.4]
### Changed
- Fixed issue of Join sequences

## [0.2.3]
### Changed
- Fixed issue with Append / Join steps
Expand Down Expand Up @@ -87,6 +91,7 @@ Thanks for all the [suggestions](https://github.com/brunomikoski/Animation-Seque

### [Unreleased]

[0.2.4]: https://github.com/brunomikoski/Animation-Sequencer/releases/tag/v0.2.4
[0.2.3]: https://github.com/brunomikoski/Animation-Sequencer/releases/tag/v0.2.3
[0.2.2]: https://github.com/brunomikoski/Animation-Sequencer/releases/tag/v0.2.2
[0.2.1]: https://github.com/brunomikoski/Animation-Sequencer/releases/tag/v0.2.1
Expand Down
5 changes: 2 additions & 3 deletions Scripts/Runtime/Core/AnimationSequencerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,9 @@ public IEnumerator PlayEnumerator()
yield return playingSequence.WaitForCompletion();
}

public Sequence GenerateSequence(Sequence sequence = null)
public Sequence GenerateSequence()
{
if (sequence == null)
sequence = DOTween.Sequence();
Sequence sequence = DOTween.Sequence();

for (int i = 0; i < animationSteps.Length; i++)
{
Expand Down
7 changes: 6 additions & 1 deletion Scripts/Runtime/Core/Steps/PlaySequenceAnimationStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ public sealed class PlaySequenceAnimationStep : AnimationStepBase

public override void AddTweenToSequence(Sequence animationSequence)
{
sequencer.GenerateSequence(animationSequence);
Sequence sequence = sequencer.GenerateSequence();
sequence.AppendInterval(Delay);
if (FlowType == FlowType.Join)
animationSequence.Join(sequence);
else
animationSequence.Append(sequence);
}

public override string GetDisplayNameForEditor(int index)
Expand Down
8 changes: 0 additions & 8 deletions Scripts/Runtime/Utils.meta

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.brunomikoski.animationsequencer",
"displayName": "Animation Sequencer",
"version": "0.2.3",
"version": "0.2.4",
"unity": "2018.4",
"description": "Animation sequencer is a way to create complex animations of sequence of events by a friendly user interface. Requires DOTween v1.2.632",
"keywords": [
Expand Down

0 comments on commit 56c59ec

Please sign in to comment.