Files
MonoGame.Extended/Source/MonoGame.Extended.Tweening/TweenGroup.cs
T

21 lines
541 B
C#

using System;
using System.Linq;
namespace MonoGame.Extended.Tweening
{
public class TweenGroup<T> : TweenAnimation<T>
{
public TweenGroup(T target, Action onCompleteAction = null, bool disposeOnComplete = true)
: base(target, onCompleteAction, disposeOnComplete)
{
}
protected override bool OnUpdate(float deltaTime)
{
foreach (var animation in Tweens)
animation.Update(deltaTime);
return Tweens.All(t => t.IsComplete);
}
}
}