mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-18 03:43:47 +00:00
Added GTWeen
This commit is contained in:
parent
457998788e
commit
2036e4e748
152 changed files with 5889 additions and 7 deletions
34
GTweensGodot/GTweens/Source/Interpolators/IntInterpolator.cs
Normal file
34
GTweensGodot/GTweens/Source/Interpolators/IntInterpolator.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using GTweens.Easings;
|
||||
|
||||
namespace GTweens.Interpolators
|
||||
{
|
||||
public sealed class IntInterpolator : IInterpolator<int>
|
||||
{
|
||||
public static readonly IntInterpolator Instance = new();
|
||||
|
||||
IntInterpolator()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int Evaluate(
|
||||
int initialValue,
|
||||
int finalValue,
|
||||
float time,
|
||||
EasingDelegate easingDelegate
|
||||
)
|
||||
{
|
||||
return (int)easingDelegate(initialValue, finalValue, time);
|
||||
}
|
||||
|
||||
public int Subtract(int initialValue, int finalValue)
|
||||
{
|
||||
return finalValue - initialValue;
|
||||
}
|
||||
|
||||
public int Add(int initialValue, int finalValue)
|
||||
{
|
||||
return finalValue + initialValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue