port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Aiwaz.Common.Animations
{
abstract public class ValueAnimation : Animation
{
public float StartValue { get; set; }
public float EndValue { get; set; }
public Func<float> ValueGetter;
public Action<float> ValueSetter;
public Func<string> ValueNamer;
public float Value
{
get { return ValueGetter(); }
set { ValueSetter(value); }
}
public ValueAnimation()
: base()
{
AnimationName = "Erroneous (Value)";
}
public override void Animate(double time, uint userData)
{
if (time < StartTime || time > EndTime)
return;
double Time = (time - StartTime) / (EndTime - StartTime);
Value = Calculate(Time);
}
protected abstract float Calculate(double NormalizedTime);
}
}