mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-25 08:22:15 +00:00
split the animations namespace into two nuget packages
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace MonoGame.Extended.Tweening
|
||||
{
|
||||
public class TweenChain<T> : TweenAnimation<T>
|
||||
{
|
||||
private int _currentTweenIndex;
|
||||
|
||||
public TweenChain(T target, Action onCompleteAction = null, bool disposeOnComplete = true)
|
||||
: base(target, onCompleteAction, disposeOnComplete)
|
||||
{
|
||||
_currentTweenIndex = 0;
|
||||
}
|
||||
|
||||
protected override bool OnUpdate(float deltaTime)
|
||||
{
|
||||
var currentTween = Tweens[_currentTweenIndex];
|
||||
|
||||
currentTween.Update(deltaTime);
|
||||
|
||||
if (currentTween.IsComplete)
|
||||
_currentTweenIndex++;
|
||||
|
||||
return _currentTweenIndex >= Tweens.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user