mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-05-30 09:49:28 -04:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
17 lines
530 B
C#
17 lines
530 B
C#
using Sandbox.MovieMaker;
|
|
|
|
namespace Editor.MovieMaker;
|
|
|
|
#nullable enable
|
|
|
|
public abstract record InterpolateOperation<T>( PropertySignal<T> First, PropertySignal<T> Second ) : BinaryOperation<T>( First, Second )
|
|
{
|
|
[SkipHotload]
|
|
private static readonly IInterpolator<T> _interpolator = Interpolator.GetDefaultOrThrow<T>();
|
|
|
|
public abstract float GetAlpha( MovieTime time );
|
|
|
|
public override T GetValue( MovieTime time ) =>
|
|
_interpolator.Interpolate( First.GetValue( time ), Second.GetValue( time ), GetAlpha( time ) );
|
|
}
|