using UnityEngine;
using LitMotion.Adapters;
namespace LitMotion
{
public static partial class LMotion
{
///
/// Create a builder for building motion.
///
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings) => Create(settings);
///
/// Create a builder for building motion.
///
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings) => Create(settings);
///
/// Create a builder for building motion.
///
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings) => Create(settings);
///
/// Create a builder for building motion.
///
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings) => Create(settings);
///
/// Create a builder for building motion.
///
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings) => Create(settings);
///
/// Create a builder for building motion.
///
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings) => Create(settings);
///
/// Create a builder for building motion.
///
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings) => Create(settings);
///
/// Create a builder for building motion.
///
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings) => Create(settings);
///
/// Create a builder for building motion.
///
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings) => Create(settings);
///
/// Create a builder for building motion.
///
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings) => Create(settings);
///
/// Create a builder for building motion.
///
/// The type of value to animate
/// The type of special parameters given to the motion entity
/// The type of adapter that support value animation
/// Motion settings
/// Created motion builder
public static MotionBuilder Create(MotionSettings settings)
where TValue : unmanaged
where TOptions : unmanaged, IMotionOptions
where TAdapter : unmanaged, IMotionAdapter
{
var buffer = MotionBuilderBuffer.Rent();
buffer.StartValue = settings.StartValue;
buffer.EndValue = settings.EndValue;
buffer.Duration = settings.Duration;
buffer.Options = settings.Options;
buffer.Ease = settings.Ease;
buffer.AnimationCurve = settings.CustomEaseCurve;
buffer.Delay = settings.Delay;
buffer.DelayType = settings.DelayType;
buffer.Loops = settings.Loops;
buffer.LoopType = settings.LoopType;
buffer.CancelOnError = settings.CancelOnError;
buffer.SkipValuesDuringDelay = settings.SkipValuesDuringDelay;
buffer.ImmediateBind = settings.ImmediateBind;
buffer.Scheduler = settings.Scheduler;
return new MotionBuilder(buffer);
}
}
}